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?
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.
They can also be written as:
HC = Highest[52](High[2])
HC = Highest[52](High[1])
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:
HC = Highest[52](High)
HCx = HC[2]
// or
HC = Highest[52](High)
HCx = HC[1]