Volume Buy Sell Indicator with Hot Percent for ThinkorSwim

S

solaris

New member
Is there a way to modify the script so i can use it in a watch list so i can watch the current buy bar and sell bar over multiple timeframes.
 
S

ShinJ

New member
@horserider Thank you for your work! I was wondering if you could add Relative Volume Standard Deviation, as a filter that will hide the candles that are below a given level.

As a reference, this is the code of RelativeVolumeStDev with Spikes threshold

Code:
declare lower;
declare zerobase;

input length = 60;
input numDev = 2.0;
input allowNegativeValues = no;

def rawRelVol = (volume - Average(volume, length)) / StDev(volume, length);
def RelVol = if allowNegativeValues then rawRelVol else Max(0, rawRelVol);

plot StDevLevel = numDev;
plot RV = if RelVol > numDev then RelVol else Double.NaN;

RV.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
RV.SetLineWeight(3);
RV.DefineColor("Above", GetColor(0));
RV.DefineColor("Below", GetColor(2));
RV.AssignValueColor(if RelVol >= numDev then RV.Color("Above") else RV.Color("Below"));
StDevLevel.SetDefaultColor(GetColor(7));
StDevLevel.SetStyle(Curve.SHORT_DASH);
# End Code
 
R

RedToGreen

New member
I posted this on the thread for the older version but i'll ask it here as well...



I've been using this indicator or a version of it for awhile now.

Is there anyway to get the hourly vol labels and/or the hist on a 2 min chart?


So instead of on a 2min chart, seeing the 2 min bar vol, I want to see the hourly levels instead.

Thanks for any help
 
T

thebewb

Member
I posted this on the thread for the older version but i'll ask it here as well...



I've been using this indicator or a version of it for awhile now.

Is there anyway to get the hourly vol labels and/or the hist on a 2 min chart?


So instead of on a 2min chart, seeing the 2 min bar vol, I want to see the hourly levels instead.

Thanks for any help
volume(period = aggregationperiod.hour);
 
R

RedToGreen

New member
I reconfigured it to correctly to show the hourly stats on a 2min chart except It still shows all the 2 min vol histogram bars.

Is there anyway to have it show only the hourly bars on a 2min chart?

Thanks
 
Rojo Grande

Rojo Grande

Member
VIP
@zeek

Code:
declare lower;

#Inputs

input ShowSellVolumePercent = yes;

def O = open;
def H = high;
def C = close;
def L = low;
def V = volume;
def buying = V*(C-L)/(H-L);
def selling = V*(H-C)/(H-L);

#Volume Data


def today = volume(period = "DAY");

def curVolume = volume;

def SellVolPercent = Round((Selling / Volume) * 100, 0);

# Labels

AddLabel(ShowSellVolumePercent, "Cur Bar Sell %: " + SellVolPercent, (if SellVolPercent > 51 then Color.RED else if SellVolPercent < 49 then Color.GREEN else Color.ORANGE));
Hello Horserider, can this be modified so I can have SellVolPercent labels for different tickers on one chart? Thanks for your time.
 
T

Thomas

Active member
VIP
Hi Horse, nice indicator wonder if you can make it go round, and signal when to go long with some bells and whistles and make it scan with columns...........:) Seriously I like the label, very helpful and use with "Hi_Low," candles.......I assume if it's green and the candles are bullish,
not much selling so look for it to move higher? Nice....
 
J

joshua74133

Member
VIP
is there a way to code volume to show previous candle volume and another box that shows the current volume
 
wtf_dude

wtf_dude

Active member
@joshua74133 This thread has all sorts of stuff like that
 
Last edited by a moderator:
R

RedToGreen

New member
Anyone know how to make this work on range bar charts?

When I apply it to the chart, nothing appears. I can add the regular tos vol indicator on range charts
 
Last edited:
N

Nomak

New member
2019 Donor
VIP
@horserider Can I have a link to the upper study?
 
M

Moose

Member
@zeek

Code:
#Advanced Volume Study
#[email protected]
#v5.22.2020
declare upper;
input ShowBuySellStrength = yes;
input TickLevel = 1000;
input ShowTickLabel = yes;


def NA = Double.NaN;
def PriceRange = high - low;

#Current Candle Buy and Sell Strength
def BuyStr = ((close - low) / PriceRange) * 100;
def SellStr = ((high - close) / PriceRange) * 100;


#$TICK Vertical Lines
def tickc = close("$TICK");
def tickh = high("$TICK");
def tickl = low("$TICK");

#$TICK Label
AddLabel(if ShowTickLabel then 1 else 0,"$TICK: " + tickc, if tickc > 0 then Color.GREEN else Color.RED);

def trinRatio = Round(close(symbol="$TRIN"),2);
def trinOverlyBearish = if trinRatio >= 2 then 1 else 0;
def trinOverlyBullish = if trinRatio <= 0.5 then 1 else 0;
AddLabel(yes, "$TRIN: "+trinRatio, if trinOverlyBearish then color.green else if trinOverlyBullish then color.red else color.gray);

def pcallRatio = Round(SimpleMovingAvg(close(symbol="$PCALL"),10),2);
def pcallOverlyBearish = if pcallRatio >= 1 then 1 else 0;
def pcallOverlyBullish = if pcallratio <= 0.85 then 1 else 0;
AddLabel(yes, "$PCALL: "+pcallRatio, if pcallOverlyBearish then color.green else if pcallOverlyBullish then color.red else color.gray);

#current candle Buy/Sell strength labels
#AddLabel(if ShowBuySellStrength then 1 else 0, " ", Color.black);
#AddLabel(if ShowBuySellStrength then 1 else 0, "1", Color.GRAY);
AddLabel(if ShowBuySellStrength then 1 else 0, "Sell " + Round(SellStr, 2) + "%", if SellStr > BuyStr then Color.RED else Color.DARK_RED);
AddLabel(if ShowBuySellStrength then 1 else 0, "Buy " + Round(BuyStr, 2) + "%", if BuyStr > SellStr then Color.GREEN else Color.DARK_GREEN);
 
S

solaris

New member
@Moose Is it possible to view this code in a watchlist, so that i can view the Buy/Sell Volume across multiple timeframes
 
S

Sneaky_Swings

New member
VIP
Hello @horserider! I am blown away by the work you have done on this forum. I was wondering if you could share your upper studies in this chart? The thing that caught my eye first was the VWAP with fractal energy script you have.
 
T

Tiredoflosing

Member
VIP
@zeek

Code:
#Advanced Volume Study
#[email protected]
#v5.22.2020
declare upper;
input ShowBuySellStrength = yes;
input TickLevel = 1000;
input ShowTickLabel = yes;


def NA = Double.NaN;
def PriceRange = high - low;

#Current Candle Buy and Sell Strength
def BuyStr = ((close - low) / PriceRange) * 100;
def SellStr = ((high - close) / PriceRange) * 100;


#$TICK Vertical Lines
def tickc = close("$TICK");
def tickh = high("$TICK");
def tickl = low("$TICK");

#$TICK Label
AddLabel(if ShowTickLabel then 1 else 0,"$TICK: " + tickc, if tickc > 0 then Color.GREEN else Color.RED);

def trinRatio = Round(close(symbol="$TRIN"),2);
def trinOverlyBearish = if trinRatio >= 2 then 1 else 0;
def trinOverlyBullish = if trinRatio <= 0.5 then 1 else 0;
AddLabel(yes, "$TRIN: "+trinRatio, if trinOverlyBearish then color.green else if trinOverlyBullish then color.red else color.gray);

def pcallRatio = Round(SimpleMovingAvg(close(symbol="$PCALL"),10),2);
def pcallOverlyBearish = if pcallRatio >= 1 then 1 else 0;
def pcallOverlyBullish = if pcallratio <= 0.85 then 1 else 0;
AddLabel(yes, "$PCALL: "+pcallRatio, if pcallOverlyBearish then color.green else if pcallOverlyBullish then color.red else color.gray);

#current candle Buy/Sell strength labels
#AddLabel(if ShowBuySellStrength then 1 else 0, " ", Color.black);
#AddLabel(if ShowBuySellStrength then 1 else 0, "1", Color.GRAY);
AddLabel(if ShowBuySellStrength then 1 else 0, "Sell " + Round(SellStr, 2) + "%", if SellStr > BuyStr then Color.RED else Color.DARK_RED);
AddLabel(if ShowBuySellStrength then 1 else 0, "Buy " + Round(BuyStr, 2) + "%", if BuyStr > SellStr then Color.GREEN else Color.DARK_GREEN);
does this not work on tick chart? also I'm assuming this is the one that shows how much is being sold on the bid and how much is bought on the offer?
 

Similar threads

Top