SendNotification() limit is 30 times?

 
Hello everyone! Why do I keep receiving not more that 30 notifications from my EA at a go, even when the loop is meant to send up to 60 notifications. Is there a limit to the number of notifications to send from buffer? Does same go for emails? Hope can this limit be increased?
 
macpee: Hello everyone! Why do I keep receiving not more that 30 notifications from my EA at a go, even when the loop is meant to send up to 60 notifications. Is there a limit to the number of notifications to send from buffer? Does same go for emails? Hope can this limit be increased?

Yes, there are limits. It is in the documentation which it seems you did not read ...

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 - Common Functions - MQL4 Reference
SendNotification - Common Functions - MQL4 Reference
  • docs.mql4.com
SendNotification - Common Functions - MQL4 Reference
 

IIRC, the maximum limit on emails, is just like SendNotification: “no more than 2 calls per second and not more than 10 calls per minute.” Add a Sleep(6) (or indicator equivalent) after the Send… and wrap a mutex around both (for multiple charts).

 
William Roeder #:

IIRC, the maximum limit on emails, is just like SendNotification: “no more than 2 calls per second and not more than 10 calls per minute.” Add a Sleep(6) (or indicator equivalent) after the Send… and wrap a mutex around both (for multiple charts).

But I get up to 30 calls in less than 10 seconds. My issuse is that the EA ignores the remaining notifications after the 30th one. Alsi, I see your mutex is a binary file and not a block of code. I must say I am grateful. But I need to know the command to use the mutex. Should it be placed before or after the SendNotification() command? The word "wrap" is even more confusing. Is it a Keyword?

 
macpee #:

But I get up to 30 calls in less than 10 seconds. My issuse is that the EA ignores the remaining notifications after the 30th one.

Alsi, I see your mutex is a binary file and not a block of code.

But I need to know the command to use the mutex. Should it be placed before or after the SendNotification() command? The word "wrap" is even more confusing. Is it a Keyword?

  1. Notifications/email is from your EA to your phone/mail. You are confused.
  2. I posted a mqh source file not binary. Go to Prevent EA from opening trades at the same time across 2 or more pairs? - MQL4 programming forum - Page%nbsp;2 #11 (2022) for a stand alone version.
  3. See Prevent EA from opening trades at the same time across 2 or more pairs? - MQL4 programming forum - Page 2 #13. Understand what a mutex does and you should understand what “wrap” means.
 
macpee #: But I get up to 30 calls in less than 10 seconds. My issuse is that the EA ignores the remaining notifications after the 30th one. Alsi, I see your mutex is a binary file and not a block of code. I must say I am grateful. But I need to know the command to use the mutex. Should it be placed before or after the SendNotification() command? The word "wrap" is even more confusing. Is it a Keyword?

"...Monitoring the frequency of use is dynamic. The function can be disabled in case of the restriction violation."

 
Fernando Carreiro #:

"...Monitoring the frequency of use is dynamic. The function can be disabled in case of the restriction violation."

I got it. I think you guys have guided me well. Thanks and I appreciate.

Reason: