Broker connection control

 

Hello,

is there any widget, EA or other that monitors the connection between the MT4 platform and the broker?

I see the connection is problematic sometimes falling in the middle of open trades...

Thank you as always!

Daniele

 
  1. Check it whenever you want. TerminalInfoInteger TERMINAL_CONNECTED Remember it takes 30-60 seconds before the terminal times out and the value changes.
  2. The real question is what are you going to do about it? If you get a OnTick, the terminal is connected. That can change in a millisecond. Even if you get TRADE_RETCODE_TIMEOUT, return wait for a new tick, verify the conditions are still valid and retry.
Reason: