This driving me crazy and I think there may be a problem with the Reset() method. Consider the code snippet
if(CurrentBar < minBarsToBeLoaded)
{
Print("**************");
Print("Time[0] = "+Time[0]);
Print("CurrentBar = "+CurrentBar);
TUp.Set(9999);
Print("TUp[0] = "+TUp[0]);
TUp.Reset(); // ensures that TUp plot value has been set to a non-plotting 0 value
Print("TUp[0] after Reset() = "+TUp[0]);
Print("Close[0] = "+Close[0]);
}
I expected to get null or zero values after the reset. Instead I got the close values - see the pic attached. Ninjatrader documentation states:
"The Reset() method allows you to reset the current bar's DataSeries value to a zero for calculation purposes but Ninjascript would ignore this value when it plotted it on a chart."
Comment