I am working on different time frames, and i want to draw zones ( like supply && demand zones )
for example I am in 15min Chart,
- i want to access daily bars to draw yesterday's High and low + 2 days ago high and low
- i want to access weekly bars to draw last week's High and low + 2 weeks ago high and low
- i want to access monthly bars to draw last month's High and low + 2 months ago high and low
- i want to access yearly bars to draw last year's High and low .
i used
-AddDataSeries(BarsPeriodType.Day, 1);
-AddDataSeries(BarsPeriodType.Week, 1);
-AddDataSeries(BarsPeriodType.Month, 1);
-AddDataSeries(BarsPeriodType.Year, 1);
and i wanted to access it with Highs[1][1] for daily bars to get Last day's High .....
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.
I also tried BarsArray[1].GetHigh(CurrentBar); it work but it shows this error when it comes to our current day now..
Error on calling 'OnBarUpdate' method on bar 248: Object reference not set to an instance of an object.
Comment