MQL4 Reference Common Functions SendNotification

MQL4 Help as One File:

SendNotification

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

bool  SendNotification(
   string  text          // Text of the notification
   );

Parameters

text

[in]   The text of the notification. The message length should not exceed 255 characters.

Return Value

true if a notification has been successfully sent from the terminal; in case of failure returns false. When checking after a failed push of notification, GetLastError () may return one of the following errors:

  • 4250 — ERR_NOTIFICATION_SEND_FAILED,
  • 4251 — ERR_NOTIFICATION_WRONG_PARAMETER,
  • 4252 — ERR_NOTIFICATION_WRONG_SETTINGS,
  • 4253 — ERR_NOTIFICATION_TOO_FREQUENT.

Note

Strict use restrictions are set for the SendNotification() function: no more than 2 calls per second and not more than 10 calls per minute. Monitoring the frequency of use is dynamic. The function can be disabled in case of the restriction violation.

SendNotification() function does not work in the Strategy Tester.

What's new in MQL5

In MQL5, the SendFTP, SendMail and SendNotification functions are moved to the new extended Network functions section. Now programs can exchange data with remote servers included in the list of allowed IP addresses. This means that MQL5 EAs are able to establish secure connections between processes using the TCP/IP protocol without using third-party DLLs.