Find high or low between bars

Forums ProRealTime English forum ProScreener support Find high or low between bars

Viewing 7 posts - 1 through 7 (of 7 total)
  • #189597

    Hi there,

    I know there is a way to find the high or low of a number of bars BACK from the current bar, but is there a way to say “find me the highest close value between bar index 2 and 10”?

    So between two arbitrary bars, find the highest or lowest value. I can probably script something up but thought there must be a function to do this!

    Thanks again

    k

    #189603

    This is the code to find “the highest close value between bar index 2 and 10”:

    it will scan bars 2 through 10 (9 bars).

     

     

    1 user thanked author for this post.
    #189658

    Thanks Robert! Wow, I never would’ve figured that out. Thanks again!

    #238626

    Hello Roberto, this is an extremely helpful snippet of code. Thanks for sharing.

    However I use it and don’t fully understand the results of the Highest function.

    Can you please help me to understand why searching for a recent high using the “HIGH” function gets a different result from the “HIGHEST” function?

    The image attached shows my result and you can find the code below.

    As far as I understand, both should return the same result.

    I am relatively new to PRT, so apologies if I’ve missed something obvious.

    Thanks,
    David.

     

    #238628

    highest[2](close)  :   search for the number of times, the highest number in brackets of what is in brackets

    2 users thanked author for this post.
    #238630

    Thank you so much! That’s done the trick.

    #238648

    Use

    to match

    as bars are identified from 0 (the current one, i.e. the first, or rightmost, bar) up to BarIndex; HIGH[BarIndex] is the HIGH of the leftmost bar, the very first bar.

    1 user thanked author for this post.
Viewing 7 posts - 1 through 7 (of 7 total)

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