I am creating a strategy that need to enter orders only when the market is open. I am currently using ES. I was using:
&& Times[0][0].TimeOfDay >= new TimeSpan(9, 30, 0)
&& Times[0][0].TimeOfDay <= new TimeSpan(16, 0 , 0)
The issue with this is that when I do a backtest it won't consider the changes in Day Saving Light changes and Holidays. Do you know a better alternative? (not only for backtest but also for the actual execution of the strategy),
Thanks for any help,
Comment