maslowski95
New member
Code:
def lastBar = HighestAll(if !IsNaN(close) then BarNumber() else 0);
A script was handed to me by a client and they had this line in their script. I've seen HighestAll(BarNumber()) before I'm just unsure what this value is actually holding.
They go on to use this variable in calculations later, such as:
Code:
def offset = Min(waveLength - 1, lastBar - BarNumber());
Doesn't Highest all calculate the highest value within a range, feeding it BarNumber would give up until the current time? Why assign this to 'last bar'?
Last edited: