High Low Lookback for ThinkorSwim

C

Chadnash

New member
VIP
Here is an example charting the bar with highest volume within 'x' bars.

Code:
# Plots High/Low Price at Highest Volume

input barsago =60;

def Volbar = BarNumber();
def HighVolBar = if ((volume - Lowest(volume, barsago)) /
                     (Highest(volume, barsago) - Lowest(volume, barsago))) >= 1
                 then Volbar
                 else Double.NaN;
def VolHighLevel = if !IsNaN(HighVolBar) then high else VolHighLevel[1];
def VolLowLevel = if !IsNaN(HighVolBar) then low else VolLowLevel[1];

plot HighLine = if Volbar >= HighestAll(HighVolBar) then VolHighLevel else Double.NaN;
plot LowLine = if Volbar >= HighestAll(HighVolBar) then VolLowLevel else Double.NaN;

HighLine.SetDefaultColor(Color.CYAN);
HighLine.SetLineWeight(2);
LowLine.SetDefaultColor(Color.Red);
LowLine.SetLineWeight(2);
# End Plots High/Low Price at Highest Volume

Thanks,

Chad
nashtech.xyz
 
R

Rome

New member
Hi @Rome,

What particular bar? I use a couple indicators to show high low of the 'x' days with highest volume... Very useful. Or high / low of yesterdays high and low is useful too as it sometimes works as support / resistance.

Thanks,

Chad
nashtech.xyz
Hi Chad


First of all, thank you for replying to my request. I should have been more specific. I'm not looking for Hi-Lo off yesterday or today or whatever time frame is on the chart, I want to know what is the low or the high for one bar, any bar. For example, if I pick one bar I want to add to that bar either the high or the low for that bar….. When you right-click on the bar you can see the high the low etcetera but you can't see them on the chart, you have to right click on the Bar and then something pops up and than ,you can see the high-low etcetera for that Bar. Do you think you write an indicator like that?I'll pay you
 

Similar threads

Top