how to be informed of lost connection?

 

Hi

I have often experienced lost connection and sometimes metatrader does not get reconnected unless i reset my router.

Is there a way to be informed of lost connection by an EA/script and maybe to be alerted after a certain time via email,alerts,etc? if the solution is to do a dll, how can that be done? thks


ronaldo

 

Run a looping script.

Get the current time from the server, compare to local time..

If it lags by X minutes, (you decide), then MT4 and the server are not talking any more.

 
phy:

Run a looping script.

Get the current time from the server, compare to local time..

If it lags by X minutes, (you decide), then MT4 and the server are not talking any more.


Thks, this is brilliant!
 

What is the order to recconect to the server?


if (counter > 6 min) .......

Reason: