All,
I am learning the basics, testing a simple MA crossover system (1 day period, checked at day close) . The system seem to prefer placing orders at 12 am. If I restrict trading to regular hours (e.g. 10 am to 4 pm), no orders are executed. Is that because technically the next period technically would’ve started and the system is getting confused? Is there a way around?
Thank you so much.
JSParticipant
Senior
When you use a 1-day timeframe, the day ends and a new one begins at midnight…
Your code is executed at the end of the bar/day/close, so your order is placed at the “Open” of the new day (12:00 am)…
If you want to trade during the day, you need to use “Intraday” timeframes, such as 1 hour, 5 minutes, or 1 second, and so on…