How to find relative minimums (maximums)

Forums ProRealTime English forum ProScreener support How to find relative minimums (maximums)

Viewing 4 posts - 1 through 4 (of 4 total)
  • #215788

    Hi,

    I know the HIGHEST[n] function that gives the highest price for the last n candles.

    Is it possible to get the HIGHEST price between 2 candles, say the nth and the mth, something like HIGHEST[n,m] ?

    How to get the candle index corresponding to the HIGHEST output ?

    Thanks

    Fred

    #215794

    HIGHEST[n,m] is not supported, but you can use:

     

    #215820
    JS

    Hi,

    You can search between two different candles for example between candle n and candle m:

    HH = Highest[m-n+1](High[n])

    To find the index of HH you make a loop through the relevant candles with HH as reference.

    For example: HH between candle 3 and 10

    HH = Highest[10-3+1](High[3])

    For i=3 to 10-1

    If High[i] = HH then

    HHBarIndex=BarIndex[i]

    EndIf

    Next

    1 user thanked author for this post.
    #215904

    ok, thanks ; I was trying to avoid the loop which can create perf issue if I’m not careful about the range..

Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login