SendNotification restrictions violation

 

Lately I have had som problems with the SendNotification function. It has worked fine for years but suddenly it stops working for periods. It looks like its because of the restrictions of max 2 call per secund and not more than 10 calls per minute. I’m trying to find a workaround of this problem and needs some help.

My first plan was to register the TimeCurrent() after the SendNotification function is run and add I delay to the next. That would work in the pair that the EA is run, but the problem is that the same EA runs on 10+ pairs. Sometimes I get the same signal on for example several EUR-pair at the same time, and when they all use the Sendnotification function at the sime time the 2 calls per second get exceeded and the function is disabled.

Is there a function that can get me the time of the last Sendnotification-message on the terminal(and not on the EA)? If so I can try to add a delay to the message if the last sent message was under 2 sec ago. 

Any tips would be greatly appreciated.

 
Although Global Variables of the client terminal are doubles, you should have no problem with storing a datetime when the notification is sent as an int. I don't know if this would be useful to you or not as I am not sure what happens when multiple EAs access the GV in quick succession. They may all read the same time value for the last notification time.
 
GumRai:
Although Global Variables of the client terminal are doubles, you should have no problem with storing a datetime when the notification is sent as an int. I don't know if this would be useful to you or not as I am not sure what happens when multiple EAs access the GV in quick succession. They may all read the same time value for the last notification time.
Thank you for a good advice. A Global variable should work and I will try it tomorrow.
Reason: