Can you please help me understand why the following code always spits out the first bars close time? I have Calculate set to Calculate.OnEachTick and TickReplay enabled on the chart. I am expecting it to fire at 5:00pm when the session restarts and the first trade occurs...? I am using NQ futures, standard trading hours, 15 min chart.
protected override void OnBarUpdate()
{
if (Bars.IsFirstBarOfSession && IsFirstTickOfBar) {
Print("Condition met at: " + Time[0].ToString() );
}
}
---------------------------------------------------------------------------
Output:
Condition met at: 12/26/2019 5:15:00 PM
Condition met at: 12/29/2019 5:15:00 PM
Condition met at: 12/30/2019 5:15:00 PM

Comment