I use in OnBarUpdate()
if (!Time.IsValidDataPoint(0)) { return; }
my setting in indicator OnStateChange() is
Calculate = Calculate.OnPriceChange; IsOverlay = true; IsSuspendedWhileInactive = false; IsAutoScale = false; BarsRequiredToPlot = 0; ShowTransparentPlotsInDataBox = true; DisplayInDataBox = false;
The indicator also works in a strategy as a backtest.
When I want to optimize the indicator in a strategy, an exception occurs
German
Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
Error message translated into English
The object reference was not set to an object instance.
The line
Time.IsValidDataPoint(0)
How do I get rid of the error?
Comment