Count of bars since the highest value of an expression in a number of bars
Syntax
SinceHigh(expr, count)
Parameters
expr - data series formula
count - lookback period
Notes
If the current bar's value is the highest (largest) value in count bars, the function returns 0. If the high was on the previous bar, the return value is 1, and so on.
If there are multiple instances of the highest value then the most recent one is used.