I need some help here, where I need to access the previous day's bar values (like high . low, EMA values ) when my strategy code is being executed on real time data.
How do I access it?
when I use lets say for example
Close [10] or Close[16] on hourly chart, i get below error:
Error on calling 'OnBarUpdate' method on bar 100: 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.
Comment