bar as seen on the far left of the chart.
High[] is using a series index, where '0' is adjusted to
always mean the most recently closed bar, on the far
right of the chart. A series index has a special name,
it's called a BarsAgo index.
When a new bar is closed, it's high value is accessible
via GetHigh(CurrentBar) or High[0].
The high value of the very first bar on the far left is always
accessible via GetHigh(0) or High[CurrentBar].
-=o=-
Careful ...
High[CurrentBar] reads like a misnomer -- so you must
first understand what the BarsAgo index means, and
then you'll understand why the series syntax is most often
used to 'look back' at historical bars.
(Hint: The 'why' is probably due to ease of programming.)
Good reading here, here, and here.
Leave a comment: