Currently I'm migrating a prospective NT-3rdParty tool.
For some reasons (performance, extended API,...) I'm using some indicators like a class to instantiate the indicator as an object:
TEClimacticDistance climacticDistance = new TEClimacticDistance ();
the neccessary data is provided by the caller (Strategy, MarketAnalyzerColumn) and the OnBarUpdate is also simulated by the caller.
in the Indicator some other Indicators are being called - this was no Problem in NT6.5
But now I'm getting a NullReferenceException - "use the new keyword to create an object instance"... at the red marked line in the code where the SMA is gonna be called.
protected override void OnBarUpdate()
{
PerformClimaticDistance ( 0 );
}
public void PerformClimaticDistance ( int barsAgo ) {
close = isExternal ? extClose : Close;
open = isExternal ? extOpen : Open;
high = isExternal ? extHigh : High;
low = isExternal ? extLow : Low;
double sma = SMA ( close, sMAPeriod )[0];
smaClose.Set(sma);
currentBar = isExternal ? extCurrentBar : CurrentBar;
if (currentBar > 2)
SetClimacticDistance(0, true);
}
Why does this not work anymore ? - hopefully this is a bug - because without this 'feature' the software is in deep troubles.

Comment