protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
// protected override void OnRender(ChartControl chartControl, ChartScale chartScale, ChartBars chartBars)
{
if (CurrentBar < 100) return;
Draw.Line(this, "newLine" + CurrentBar, 5, Low[5], 3, Low[3], Brushes.Red);
return;
}
Indicator 'OnRenderProblem': Error on calling 'OnRender' method on bar 550: 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 don't understand it..why it give me error? the number of Bar is >5....

Comment