I am trying to create an entry filter in an OnEachTick strategy to enter only if current second is below 50.
For this i am calling a private int CurrentBarSec using "marketDataUpdate.Time.Second" in OnMarketData and applying the filter condition in OnBarUpdate (CurrentBarSec < 50). However, it's not working when i am doing a backtest...
Any idea why this is happening?
Is there any other way to get this condition?
Thank you in advance!
Best,
Comment