程序库: 日历 - 页 15

 
Denis Kislicyn #:
最近,我发现将整个日历保存到文件中以便在测试仪中使用时,在大约 50 秒后开始超时崩溃。
该错误无法重现。
 
Denis Kislicyn CalendarValueHistory 传递的 时间 超过一个月,函数就会挂起约 50 秒,然后超时崩溃。
无法重现。
void OnStart()
{
  MqlCalendarValue Values[];
  
  Print(CalendarValueHistory(Values, D'2025.01.01'));
  Print(_LastError);
}
 
fxsaber #:
没有复制。
似乎与此有关:


可能需要添加封装函数以确保可靠性
 
fxsaber # :
无法重现。


我在不同的服务器和不同的终端上进行了测试。CalendarValueHistory 总是超时。为了解决这个问题,我们在附近的分支中创建了一个包装器。

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 总是以超时结束。

我的情况并非如此。

 

该相信谁?