In years past I created two indicators for use on a bar chart, worked fine.
I am starting a new indicator and began with a bar chart and all was/is well. The new indicator needs to to run on a mountain chart and when I tried to use the new indicator the fun stopped.
The chart has many "bars" or for the mountain chart, many close data points.
Version 8.0.26.1 64-bit
1 minute chart
double currentClose = Close[0]; double previousClose = Close[1];
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.
The question, how to get the current and previous data point for the chart.
Ideas?
Thanks,
Mark
Comment