Download MetaTrader 5

Problem with more than 1 SendNotification (on iOS)

To add comments, please log in or register
Do you know that MQL5 can create custom graphical tools?
Rainer
5
Rainer 2014.01.31 09:56 

hi,

I have a problem with the SendNotification function. It works well but only once. In the sample code there should be 5 Messages and each time I expect 1 Mail, 1 PushNotification and 1 entry in the Log. In the result I get 5 eMails, 1 PushNotification and 5 rows in the Logfile. Any idea where the missing PushNotifications are?

int init() {
myMessage("Test1");
myMessage("Test2");
myMessage("Test3");
myMessage("Test4");
myMessage("Test5");
return(0);
}

void myMessage(string myMsgText) {
SendMail("MSA Alert", myMsgText);
SendNotification("MSA Alert"+":"+myMsgText);
Print("MSA Alert:"+":"+myMsgText);
return;
} // END myMessage()

Tjipke de Vries
6315
Tjipke de Vries 2014.01.31 10:08  
sinonimo:

hi,

I have a problem with the SendNotification function. It works well but only once. In the sample code there should be 5 Messages and each time I expect 1 Mail, 1 PushNotification and 1 entry in the Log. In the result I get 5 eMails, 1 PushNotification and 5 rows in the Logfile. Any idea where the missing PushNotifications are?

int init() {
myMessage("Test1");
myMessage("Test2");
myMessage("Test3");
myMessage("Test4");
myMessage("Test5");
return(0);
}

void myMessage(string myMsgText) {
SendMail("MSA Alert", myMsgText);
SendNotification("MSA Alert"+":"+myMsgText);
Print("MSA Alert:"+":"+myMsgText);
return;
} // END myMessage()


bool SendNotification(string message)

Sends Push notification to mobile terminals whose MetaQuotes IDs are specified on the "Notifications" tab in options window. Sending notifications can be disabled in the settings. The ID can also be omitted. In case of error, the function returns false. To get information about the error, call the GetLastError() function. Note: The SendNotification() function has strict limitations on its usage: no more than 2 calls per second and no more than 10 calls per minute. Frequency of calls is controlled dynamically, and the function can be blocked in case of violation.

To add comments, please log in or register