【发布时间】:2021-07-23 02:33:55
【问题描述】:
我无法在更高的时间范围内获取柱的时间值。我正在测试仪中测试我的智能交易系统,当我尝试使用带有 PERIOD_D1 参数的函数 iTime() 时,我总是收到 @987654324 的值@。
另外,GetLastError() 函数返回“not enough memory for history data”消息。即使测试人员运行了几天的数据,它也会一直重复。下面是我尝试运行的代码:
datetime t = iTime( Symbol(), PERIOD_D1, 0 );
Print( "Trend tick time: " + t );
int check1 = GetLastError();
if ( check1 != ERR_NO_ERROR ) Print( "Error: ", ErrorDescription( check1 ) );
我得到这样的输出:
0 22:33:24 2016.06.29 08:00 HLR FDE30,M1: Trend tick time: 1970.01.01 00:00:00
0 22:33:24 2016.06.29 08:00 HLR FDE30,M1: Error: not enough memory for history data
0 22:33:25 2016.06.30 08:00 HLR FDE30,M1: Trend tick time: 1970.01.01 00:00:00
0 22:33:25 2016.06.30 08:00 HLR FDE30,M1: Error: not enough memory for history data
0 22:33:26 2016.07.01 08:00 HLR FDE30,M1: Trend tick time: 1970.01.01 00:00:00
0 22:33:26 2016.07.01 08:00 HLR FDE30,M1: Error: not enough memory for history data
[...]
当我调用其他采用 timeframe 参数的内置函数时,也会发生同样的事情。例如 iMA()、iCCI()、iRSI()。
文档表明上述函数可以接受任何时间范围值:https://docs.mql4.com/series/itime
我将补充一点,我的 MetaTrader 终端图表设置是:
Max bars in history: 1250000
Max bars in chart: 1250000
您有什么建议可以解决这个问题吗?
也许还有其他一些设置或环境限制,我不知道?
【问题讨论】:
标签: mql4 metatrader4