This is an indicator.
I'm trying to count the number of bars between an event for a given number of bars:
protected override void OnBarUpdate()
{
if (CountIf(() => (Close[0] / Open[0]) - 1, N) > Threshold);
Value[0];
}
Thank you

Comment