With this script, I get results that will show an 8% or smaller range of the last 5 daily bars. If I wanted it to show the last 5 bars, not counting the current bar, how would you do it?
**********************************************************
#Shows consolidation range last 5 bars
def HH= Highest(high, 5);
def LL = Lowest(low, 5);
def Consolidate = (HH-LL)/LL*100;
Plot signal = if Consolidate <8.00 then 1 else 0;
***********************************************************
**********************************************************
#Shows consolidation range last 5 bars
def HH= Highest(high, 5);
def LL = Lowest(low, 5);
def Consolidate = (HH-LL)/LL*100;
Plot signal = if Consolidate <8.00 then 1 else 0;
***********************************************************