hi
i loocking for function that tell me when was the high value x candle back
i tried the pivot high
but its give me a number grater then x candle i set
for exemple :
i want to lookback 20 candle and know before how much candle was the high value
i tried
hh= pivothigh (high,20,0)
candleformhigh=barssisnce(hh)
and sometimes its give me number that big then 20