The code is:
protected override void OnBarUpdate()
{
if(CurrentBar<20) return;
Plot0[0]=(Close[0]-ADXVMA(10)[0]);
}
And when adding the indicator to the chart, there is not any plot and the log says:
"Error on calling 'OnBarUpdate' method on bar 20: Object reference not set to an instance of an object"
The ADXVMA indicator works fine when I insert it in the chart manually.
Comment