Download MetaTrader 5
MQL5 ReferenceCommon FunctionsSendNotification 

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:

  • 4515 — ERR_NOTIFICATION_SEND_FAILED,
  • 4516 — ERR_NOTIFICATION_WRONG_PARAMETER,
  • 4517 — ERR_NOTIFICATION_WRONG_SETTINGS,
  • 4518 — 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.


Updated: 2015.12.03