Download MetaTrader 5

Cannot get Weekly price during backtest at strategy tester

To add comments, please log in or register
Ali Buang
127
Ali Buang  

Hi all,

 

 I'm testing my EA at strategy tester. The problem is I cannot get the price for  Open, High , Low , Close for weekly candle (PERIOD_W1) .  During the testing, I'm using timeframe M1, M5 and H1 . The debug code and result as below.

As you can see there, for all other timeframe, I managed to get the price including monthly price. The problem is only the weekly price is missing. Anyone has any idea how to resolve this. Thanks

Note: I'm using Instaforex broker. 

 

Rdgs

Ali 

// debug
      double high_M1 = iHigh(Symbol(),PERIOD_M1,1);
      double high_M5 = iHigh(Symbol(),PERIOD_M5,1);
      double high_M15 = iHigh(Symbol(),PERIOD_M15,1);
      double high_M30 = iHigh(Symbol(),PERIOD_M30,1);
      double high_H1 = iHigh(Symbol(),PERIOD_H1,1);
      double high_H4 = iHigh(Symbol(),PERIOD_H4,1);
      double high_D1 = iHigh(Symbol(),PERIOD_D1,1);
      double high_W1 = iHigh(Symbol(),PERIOD_W1,1);
      double high_MN1 = iHigh(Symbol(),PERIOD_MN1,1);
      
      Print( "M1=" + high_M1 + " M5="+ high_M5+ " M15=" + high_M15+ " M30=" + high_M30+ " H1=" + high_H1+
      " H4=" + high_H4 + " D1=" +high_D1+ " W1=" + high_W1+ " MN1=" +high_MN1);

 

Result :

2017.02.05 10:07:14.096 2017.01.30 00:00:00  Boboibot_3_8_Demo_Beta EURJPY,M1: M1=123.123 M5=123.139 M15=123.139 M30=123.139 H1=123.139 H4=123.146 D1=123.297 W1=0 MN1=124.081

 

Marco vd Heijden
Moderator
5563
Marco vd Heijden  
Have you checked history center to see if the bar exists ?
whroeder1
15934
whroeder1  
History data and error 4066 - MQL4 forum You have to make sure other TFs/pairs are downloaded (which takes time) and then get the values.
Ali Buang
127
Ali Buang  

Thanks for the reply.

I‌ manage to resolve it by deleting old history tester data *.fxt files in the /tester/history folder.  After that rerun strategy should work fine.

whroeder1
15934
whroeder1  
Ali Buang: . The problem is only the weekly price is missing.
'Testing Features and Limits in MetaTrader 4' - MQL4 Articles
Weekly, monthly, and irregular timeframes are not tested
To add comments, please log in or register