Notification when disconnected

To add comments, please log in or register
Daniel Sowa
840
Daniel Sowa  

Hey,

is there a way to get a notification via email or push to mobile devices if the MetaTrader client running on a server goes offline (no connection bottom right corner)?

This would avoid offline times and missing action form the trading signal.

Thx!

Conor Dailey
892
Conor Dailey  
  if(!IsConnected())
    {
     SendNotification("No connection!");
     return(0);
    }

Like that?

Fernando Carreiro
4985
Fernando Carreiro  
Conor Dailey: Like that?

It will not work that easily, because if it is disconnected there will not be any incoming ticks. Your code will have to be placed in the OnTimer() event handler for it to function usefully. Also, it takes a while for the terminal to recognise that it is disconnected so it will have a long delay before IsConnected() actually returns a false value.

Flavio Jarabeck
75436
Flavio Jarabeck  
DS1976:

Hey,

is there a way to get a notification via email or push to mobile devices if the MetaTrader client running on a server goes offline (no connection bottom right corner)?

This would avoid offline times and missing action form the trading signal.

Thx!

This is a conundrum...

There will be a high chance that when MT is disconnected from the Broker server would be because of the connection of machine running the MT instance... So, how can you send a message to the outside world if you have NO connection at all?

Maybe you can do the opposite, monitoring your server (assuming, i.e. A VPS server) from the outside. If it does not respond, you send an Alert message... There are several free/paid services like this out there...

;)

nicholi shen
2392
nicholi shen  
Minions Labs:

This is a conundrum...

There will be a high chance that when MT is disconnected from the Broker server would be because of the connection of machine running the MT instance... So, how can you send a message to the outside world if you have NO connection at all?

Maybe you can do the opposite, monitoring your server (assuming, i.e. A VPS server) from the outside. If it does not respond, you send an Alert message... There are several free/paid services like this out there...

;)

You can place limit orders so far off market and at volumes that wouldn't fill anyway -- and use the comment field as a tiny messaging service. A monitor EA on a separate machine then monitors the orders (with specific Magic) and deletes them after collecting the message... If the trading bot fails to check-in then have the monitor alert you...

To add comments, please log in or register