I hope my message finds you well. I need some help on the CountIF function, which I don't understand why it is not working.
Here is the code,
_BreakBelowLondonSessionLow = CrossBelow(Closes[2], LONDONInitialBalanceLow, 1) || CrossBelow(Lows[2], LONDONInitialBalanceLow, 1);
_BreakBelowLondonSessionLow &= j2BarCounter1[0] > 180;
if(_BreakBelowLondonSessionLow)
{
BackBrush = Brushes.Pink;
BarCounterCrossBelowLondonLow = CurrentBars[2];
}
_StartingofSession = j2BarCounter1[0] == 180;
if(_StartingofSession)
{
CounterStartSession = CurrentBars[2];
}
CountingofCrosses = CountIf(() => _BreakBelowLondonSessionLow, (CurrentBars[2] - CounterStartSession));
Print(Times[2][0] + " Number of Crosses: " + CountingofCrosses);
When I ask to print the values, it always give me a value of 0,which is wrong.
Can you help?
Thank you

Comment