ERR_CALENDAR_TIMEOUT (Error 5401) for CalendarValueHistory

 

I have been running this code for a long time without any problems.

ResetLastError();

CalendarValueHistory(mqlcalendar_value,iTime("EURUSD",PERIOD_D1,0),iTime("EURUSD",PERIOD_D1,0)+PeriodSeconds(PERIOD_D1)-60,"","");
      
Print(GetLastError());

However, running from a different computer with a different internet connection returns Error 5401 (even though I recompiled the code on that machine).

Expert halts for about 50 sec and then continues.

Charting, trading and so on still working without problems.


Any idea what's the problem here?

 
timkrug:

I have been running this code for a long time without any problems.

However, running from a different computer with a different internet connection returns Error 5401 (even though I recompiled the code on that machine).

Expert halts for about 50 sec and then continues.

Charting, trading and so on still working without problems.


Any idea what's the problem here?

Hi there!

I've just faced the same issue, but I guess I know the cause - if you will run terminal with few copies of ea that is running on, when you launch terminal they all trying to get calendar info at the same time that begets such type of errors (at least in my case that was the cause).

Reason: