52 week high Explain the difference between these 2

Forums ProRealTime English forum ProScreener support 52 week high Explain the difference between these 2

Viewing 3 posts - 1 through 3 (of 3 total)
  • #114944

    Hey,

     

    this is such a simple question but I am looking at some old coding of mine and notice 2 things I’ve put in differently

     

    HC = Highest [ 52 ] ( High ) [ 2 ]

    HC = Highest [ 52 ] ( High ) [ 1 ]

     

    What is the difference between the 1 and the 2, is it that the last 2 bars are high closes on the prevous 52 and the last 1 bar is a high close on the previous 52?

    #114945

    Both find the highest high within the last 52 bars.

    The difference is that [1] starts from the 1st bar preceding the current one (which is none or [0]), while [2] starts from the 2nd bar preceding the current bar. [1] will scan bars 1-52, [2] will scan bars 2-53.

    #114946

    They can also be written as:

    there’s no difference (only logic differs).

    This example fits best my explanation above.

    You examples scan 52 bars, but they retrieve the value that was retained 2 and 1 bars ago, respectively.

    You could accomplish the same goal with:

     

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

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