Welcome to the BEST forum for traders

Did you know we're sharing tons of exclusive content here?
Our community is growing quickly. Take a look around and say "Hello".

Pivot high count more then i set

Jul 26, 2020 - 2:15 PM

Viewed 459 times

https://best-trading-indicator.com/community/bti/forums/4180/topics/18073 COPY
  • 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

    0
  • Hello there

    Did you consider the highestbars function?

    Documentation: https://www.tradingview.com/pine-script-reference/v4/#fun_highestbars

    Dave

    0

    Dave - Helping traders becoming the best version of themselves
CONTENTS