Despite multiple attempts I cannot get beyond this error I am getting when trying to read values from previous bars:
Error on calling 'OnBarUpdate' method on bar 0: You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.
my code is simple : double _prevclose = Close[1];
When I search the documentation I find the following example:
For example, if we wanted to subtract the high and low of 10 bars ago from each other we would do this:
double value = High[10] - Low[10]; |
Diepy
Comment