简体   繁体   English

MultiTimeFrame指标回测mql4

[英]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. ...在发布我想理解的任何答案之前,您如何看待自定义指标上下文中的多时限策略?

How to make the step forward? 如何向前迈进?

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:

}

Does it work in spite of many posts on failed MTF [ StrategyTester ] results? 尽管在失败的MTF [ 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. 最近的“ newMQL4.56789+转换和频繁的临时编译器(语法)实时更新(您会获得一个新的Help来通知他们)使单元测试成为预发布测试+生产代码维护的必做部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 MQL4 中放置一个指标和带有仅指标功能的 EA - Put an Indicator inside and EA with Indicator-Only functions in MQL4 解释一个MQL4周期标识符wHistory.mq4(一个自定义技术指标) - Explain an MQL4 Cycle Identifier wHistory.mq4 ( a custom technical indicator ) 如何从 Expert Adviser 的 MQL4 中的自定义指标获取变量值? - How to get a variable value from a Custom Indicator in MQL4 in Expert Adviser? 如何从 MQL4 中的自定义指标值获取历史数据? - How can I get history data from my custom indicator value in MQL4? 在mql4 / 5中查找最后一波 - Finding last wave in mql4/5 将指标从MQL4转换为C#几乎完成,需要帮助使其完全正常(2个输出中的1个滞留在代码中的某个位置) - Indicator converted from MQL4 to C# almost done, need help making it fully work (1 out of 2 Outputs stuck in code somewhere) MQL自定义指标调用另一个自定义指标 - MQL custom indicator calling another custom indicator 指标图最大和最小价格MQL5 - Indicator Chart maximum and minimum price MQL5 使用起作用的Pine-Script示例无法在MQL4中计算正确的Volume RSI - Can't calculate the right Volume RSI in MQL4 with a functioning Pine-Script Example 我正在尝试创建 EA(MQL4) 并且出现 EA 错误中出现严重错误数组超出范围 - I am trying to create EA(MQL4) And Critical error Array out of range in EA error appeared
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM