Topic: Suspend and delay signals when market is off around midnight
I want to add a fix in the EA's code to work around the problem with the brokers that suspend the trading around midnight for swap calculations.
The problem appears when we trade mostly on D1, H4, or H1 charts and the strategy has a signal at 00:00 but the market is off.
A possible solution is to "remember" the signals and execute it when the market is open.
We have to add some limitations for how long the signal can be delayed.
A possible workflow is:
- save the signal if the market is closed
- periodically check if the market is open (let's say every 15 seconds)
- send the order if the market is open.
- cancel the signal if the market is closed for longer than N minutes. Log a message.
I also want to have a predefined time for this procedure. Let's say:
We can add these options in the EA Studio's Settings. Something like that:
[ V ] Enable signal delay on Market Closed
Expected Market Closed time start: 23:55
Expected Market Closed time end: 00:05
Maximum time for signal delay in minutes: 2.0
Retry interval in seconds: 15
Please share your opinion.
If you have a working code, please share it. It will help us to come with a faster and more stable solution.