Times out (30? seconds) reconnects, updates history, next tick is processed.
There is no error code because your code wasn't running.
There's something similar being reported lately , the trades fail with retcode 10031 , lost connection to trade server
but they are gated with
bool IsConnected(){ bool result=(bool)TerminalInfoInteger(TERMINAL_CONNECTED); return(result); }
alongside spread ,margin, trading allowance, symbol session, checks .

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
What events are triggered/generated when MT5 gets disconnected from the server and then reconnects?
OnInit? OnDeinit? OnTick?
How can I get/catch the error code?
Thanks