Download MetaTrader 5

how to run strategy tester base on multi-timeframe?

To add comments, please log in or register
HongDi s& t development co.,ltd.
1605
hongbin fei 2010.05.07 18:20 

my robot is need h1 and h4 and D1 trend in same time, but I cannot any setting for this in strategy tester ,

can you help me?

Oleg
8
Oleg 2010.05.09 02:15  
codeidea posted  :

my robot is need h1 and h4 and D1 trend in same time, but I cannot any setting for this in strategy tester ,

can you help me?

 

Hey

you can specify separate timeframes for different indicators

you can also hard-code them 

for example if you need close prices:


CopyRates(Symbol(),PERIOD_H1,0,100,rates_h1);

CopyRates(Symbol(),PERIOD_H4,0,100,rates_h4);

etc..


if you want to make sure that you recalculate your indicators only on new H1 bar and H4 bar and D1 bar

then you might find this post useful:

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


hope that helps


Indicators: isNewBar
  • www.mql5.com
The function saves its time, it's the current bars, the next bar will be new.
HongDi s& t development co.,ltd.
1605
hongbin fei 2010.05.09 06:45  

firehawk: 

but there are graphics object ( like trend) on H4 and D1, I want let robot in H1 to get them, not only the price information.

 

thanks

hongbin.fei 

HongDi s& t development co.,ltd.
1605
hongbin fei 2010.05.15 18:55  

no one can answer?

thanks 

Chunyong Guo
264
Chunyong Guo 2016.09.27 20:04  

So far as I know, MT5's Tester does not support multi-timeframes.

To add comments, please log in or register