Libraries: Calendar - page 15

 
Denis Kislicyn #:
Recently I noticed that saving the entire calendar in a file to work with it in the tester started to crash on timeout, after about 50 sec.
The error is not reproduced.
 
Denis Kislicyn CalendarValueHistory , the function starts hanging for about 50 seconds and then crashes by timeout.
It is not reproduced.
void OnStart()
{
  MqlCalendarValue Values[];
  
  Print(CalendarValueHistory(Values, D'2025.01.01'));
  Print(_LastError);
}
 
fxsaber #:
It is not reproduced.
Seems to be related to this:


Maybe want to add the wrapper function for reliability
 
fxsaber # :
It is not reproduced.


I tested it on different servers and different terminals. CalendarValueHistory always times out. A wrapper was created in a nearby branch to work around it.

https://www.mql5.com/en/forum/496980

Error ERR_CALENDAR_TIMEOUT in CalendarValueHistory when passing more than 1 month interval - I am trying to fix a problem with the CalendarValueHistory function and how to fix it
Error ERR_CALENDAR_TIMEOUT in CalendarValueHistory when passing more than 1 month interval - I am trying to fix a problem with the CalendarValueHistory function and how to fix it
  • 2025.10.06
  • www.mql5.com
Would recommend just preloading it by a day or so and only checking every new m1 bar with a retry mechanism in case it doesn. I tested it on three different brokers, as well as on different servers and terminals. Now it times out everywhere if i call it with a period longer than a month
 
Denis Kislicyn #:

CalendarValueHistory is always terminated with a timeout.

This is not the case for me.