Event Calendar throws often 5401 error (ERR_CALENDAR_TIMEOUT) after 3800 update

 

I have coded three EAs which fetch the event date of the Non farm payrolls in the OnInit() function of the EA via CalendarValueHistoryByEvent() with the event ID 840030016.

After the update of MT5 with build 3800 two of the three EAs fail to start in the OnInit() because the  CalendarValueHistoryByEvent() function returns Error 5401 which stands for ERR_CALENDAR_TIMEOUT. 

The EA which starts first (does not matter which of the three is first) receives the correct value from  CalendarValueHistoryByEvent(), but all EAs after this run then into the timeout.

I think this is because with the update 3800 I am authenticated with my MQL5 user, so I think I am blocked because of to much requests after the first request or this is a bug.

Can someone tell me the limits of how often I can ask for a calendar event per second / minute / hour or confirm that this is not a bug and it should be like this?

Any Ideas how to solve this?

 
ChristophKoe:

I have coded three EAs which fetch the event date of the Non farm payrolls in the OnInit() function of the EA via CalendarValueHistoryByEvent() with the event ID 840030016.

After the update of MT5 with build 3800 two of the three EAs fail to start in the OnInit() because the  CalendarValueHistoryByEvent() function returns Error 5401 which stands for ERR_CALENDAR_TIMEOUT. 

The EA which starts first (does not matter which of the three is first) receives the correct value from  CalendarValueHistoryByEvent(), but all EAs after this run then into the timeout.

I think this is because with the update 3800 I am authenticated with my MQL5 user, so I think I am blocked because of to much requests after the first request or this is a bug.

Can someone tell me the limits of how often I can ask for a calendar event per second / minute / hour or confirm that this is not a bug and it should be like this?

Any Ideas how to solve this?

There are no specific documented limits for requesting calendar events per second, minute, or hour in MetaTrader 5. However, excessive or frequent requests can potentially result in timeouts or temporary restrictions. To resolve this issue, you can implement error handling mechanisms and reduce the frequency of your requests.

 
Soraya Bahlekeh #:

There are no specific documented limits for requesting calendar events per second, minute, or hour in MetaTrader 5. However, excessive or frequent requests can potentially result in timeouts or temporary restrictions. To resolve this issue, you can implement error handling mechanisms and reduce the frequency of your requests.

Thank you. I have implemented it now by caching the dates in global variables and using error handling with retries. It seems to work.