[英]MultiTimeFrame Indicator BackTesting mql4
before posting any code I would like to understand if it is possible to backtest a Custom Indicator , for a MetaTrader4 Terminal , based on a multi time frame strategy. 在发布任何代码之前,我想了解是否可以基于多时间框架策略对MetaTrader4终端的自定义指标进行回测。
I have looked on mql5
forum, but I could not find any clear indications or approach to the issue. 我看过
mql5
论坛,但找不到任何明确的迹象或解决此问题的方法。
...before posting any answer I would like to understand, what do you consider a multi-time frame strategy in custom indicator context. ...在发布我想理解的任何答案之前,您如何看待自定义指标上下文中的多时限策略?
Select your own way - The Approach 选择自己的方式- 方法
In any case, 任何状况之下,
one can use function calls aimed to retrieve values, collected from a perspective of a different time-frame, with a use of proper indication of 可以使用旨在检索值的函数调用,这些值是从不同时间范围的角度收集的,并且使用了适当的指示
{ PERIOD_M1 | .. | PERIOD_H1 | PERIOD_H4 | .. }
in the function call protocol, 在函数调用协议中,
or 要么
one can create and maintain one's own virtual super-framing / sub-framing independently of the current graph's " own " time-frame. 可以独立于当前图形的“ 自己 ”时间范围来创建和维护自己的虚拟超帧/子帧。
double v30SEC_O[], v30SEC_H[], v30SEC_L[], v30SEC_C[],
vM1_O[ ], vM1_H[ ], vM1_L[ ], vM1_C[ ],
vM3_O[ ], vM3_H[ ], vM3_L[ ], vM3_C[ ],
vH7_O[ ], vH7_H[ ], vH7_L[ ], vH7_C[ ]; // vTF as needed
bool v30SEC_newBarEVENT = False,
vM1_newBarEVENT = False,
vM3_newBarEVENT = False,
vH7_newBarEVENT = False;
void aNewBarEventMONITOR(){ ...
static int v30SEC_Bars = EMPTY,
vM1_Bars = EMPTY,
vM3_Bars = EMPTY,
vH7_Bars = EMPTY;
// check aNewBarEVENT:
// update state-vars:
}
StrategyTester
] results? StrategyTester
]结果上有很多帖子,它仍然有效吗? In each of cases posted above, one may use the other one to check and proof the correctness of the outputs. 在上述每种情况下,都可以使用另一种方法来检查和证明输出的正确性。
Yes, unit-tests are a good safety belts habit in this domain. 是的,在这个领域,单元测试是一个很好的安全带习惯 。
The recent " new "- MQL4.56789+
shifts and frequent interim compiler ( syntax ) live-updates ( you get a new Help to notice them ) make unit-testing a must-do part of the pre-release testing + production code maintenance. 最近的“ new ”
MQL4.56789+
转换和频繁的临时编译器(语法)实时更新(您会获得一个新的Help来通知他们)使单元测试成为预发布测试+生产代码维护的必做部分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.