Can an EA check to see if a broker is open for trading before executing a trade?
I'm working on a hedging program between 2 brokers, and I don't want just one leg to be executed because one broker is open and the other is not.
I am mostly interested in the times around the makets opening and closing. Some brokers close at different times than others.
Come to think of it, there is no way to tell about the broker closing. Suppose you had a function AreYouOpenForTrades() and it returns YES! Well 1ms later when you place the trade the answer could be NO. There is no "WillYouBeOpenForTheNextFiveMinutes() function possible.
You could be more cautious around hour boundaries,
you could program an array of closing times for each broker,
and you could put your hedge on in 10 equal parts to limit the hedge exposure to 1/10th the previous value.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Can an EA check to see if a broker is open for trading before executing a trade?
I'm working on a hedging program between 2 brokers, and I don't want just one leg to be executed because one broker is open and the other is not.
I am mostly interested in the times around the makets opening and closing. Some brokers close at different times than others.
Thanks for any feed back.