I hope my message find you well.
I am trying to have displayed on the NinjaTrader Output window how many times a condition occurs, but the result is always 0, which cannot be true.
Would you be able to help?
Thank you
private void PriceGoingImbalance()
{
// Condition for Price Crossing 1STD.
_CrossUp1STD = Close[0] > amaCurrentWeekVWAP1.UpperBand1[0];
_CrossUp1STD &= Low[0] < amaCurrentWeekVWAP1.UpperBand1[0];
CountIf(() => _CrossUp1STD, CurrentBar);
Print("-------------------------------------");
Print(Time[0]);
Print("Number of Signals Imbalance Up : " + CountIf(() => _CrossUp1STD, CurrentBar));
Print("Total Number of Bars: " + CurrentBar);
Print("-----------------------------------");
}

Comment