Using this custom indicator by itself plots the values correctly on the chart without causing the error to occur. Please help!
private int period = 21;
public DataSeries TmpDataSeries;
protected override void Initialize()
{
Add(new Plot(Color.Green, "TmpAngle"));
CalculateOnBarClose = true;
Overlay = false;
TmpDataSeries = new DataSeries(this);
}
protected override void OnBarUpdate()
{
TmpDataSeries.Set(ChartControl.GetYByValue(Bars,SM A(period)[0]));
.
.
.
}
Comment