I have read the documentation and the other thread with the same name. So my 2 plots and the Values are where they should be but still am getting the above error.
My two plots are as per the documentation:
if (State == State.SetDefaults)
{
AddPlot(Brushes.Blue, "PlotA"); // Defines the plot for Values[0]
AddPlot(Brushes.Red, "PlotB"); // Defines the plot for Values[1]
}
protected override void OnBarUpdate()
{
Values[0][0] = GreenValue;
Values[1][0] = RedValue;
}
The error happens even if I comment the lines AddPlot and Values!.
I tried to copy and paste in a blank editor page all the code except NinjaScript generated code. But the problem persists.
So which are the causes that can cause the above error?
Comment