ChartOpen in Strategy Tester Build 2885 doesn't work

 

Dear community,


I have build a EA last year with following code snipped: 


long chartM1,chartM10,chartH1,chartD1;
int OnInit()
  {
   chartM10 = ChartOpen(Symbol(),PERIOD_M10);
   chartH1 = ChartOpen(Symbol(),PERIOD_H1);
   chartD1 = ChartOpen(Symbol(),PERIOD_D1);
   chartM1 = ChartID();
   }


But in the new version of MT 5 this snipped doesn't work in the strategy tester.

But it works in the debug mode on real data.


Have someone an idea?

Thank's for your help.

 
mql20520:

Dear community,


I have build a EA last year with following code snipped: 



But in the new version of MT 5 this snipped doesn't work in the strategy tester.

But it works in the debug mode on real data.


Have someone an idea?

Thank's for your help.

This has never worked in the Strategy Tester.
 
Do you know a workaround to work with more charts in the Strategy Tester?
 
mql20520:
Do you know a workaround to work with more charts in the Strategy Tester?
You can have additional charts automatically open if you refer to the underlying data in your code.
 
Could you give me a example code snipped?
 
mql20520 #:
Could you give me a example code snipped?


I Have solved this problem with this code:


//"You can have additional charts automatically open if you refer to the underlying data in your code." by Alain Verleyen

void ChartOpenOnTester(string symbol, ENUM_TIMEFRAMES timeframe)
  {
   double tempValueOnlyToOpenThisChartOnTester = iClose(symbol,timeframe,0);
  }


usage:


void ChartOpenOnTester(string symbol, ENUM_TIMEFRAMES timeframe)
  {
   double tempValueOnlyToOpenThisChartOnTester = iClose(symbol,timeframe,0);
  }


int OnInit()
  {
   ChartOpenOnTester(Symbol(),PERIOD_M10);
   return INIT_SUCCEEDED;
  }