How to enable alert for special cases ?

 

Hello and Happy New Year to all,

Can any expert developer help me to find a solution for special case that few broker disable trading during certain high/medium impact news time.
So how to make mobile notification alert for such situations when broker enable the trading after market get back to normal after news, we get notification on mobile.

Enabling notification is simple but how to create that bridge between broker and MT4 for enabling/disabling trading.

 
Manpreet Singh: Can any expert developer help me to find a solution for special case that few broker disable trading during certain high/medium impact news time. So how to make mobile notification alert for such situations when broker enable the trading after market get back to normal after news, we get notification on mobile. Enabling notification is simple but how to create that bridge between broker and MT4 for enabling/disabling trading.

Write an MQL program that uses the IsTradeAllowed function to detect when trading is disallowed, and then send the push notification to you mobile device with the function SendNotification.

IsTradeAllowed

Checks if the Expert Advisor is allowed to trade and trading context is not busy

Checkup

SendNotification

Sends push notifications to mobile terminals, whose MetaQuotes ID are specified in the "Notifications" tab

Common Functions

IsTradeAllowed - Checkup - MQL4 Reference
IsTradeAllowed - Checkup - MQL4 Reference
  • docs.mql4.com
IsTradeAllowed - Checkup - MQL4 Reference
 
Manpreet Singh:   but how to create that bridge between broker and MT4 for enabling/disabling trading.

No “bridge” is required, the EA is code to just not trade then.

 
Fernando Carreiro #:

Write an MQL program that uses the IsTradeAllowed function to detect when trading is disallowed, and then send the push notification to you mobile device with the function SendNotification.

IsTradeAllowed

Checks if the Expert Advisor is allowed to trade and trading context is not busy

Checkup

SendNotification

Sends push notifications to mobile terminals, whose MetaQuotes ID are specified in the "Notifications" tab

Common Functions

Thank you Fernando. :)

Want to know one more thing that, Do this work for few specific pairs if we want and ignore other pairs?