Not able to open different Symbol chart in Strategy Tester?

To add comments, please log in or register
jaffer wilson
918
jaffer wilson  

I have tried the following code, it works properly on the live chart but not in the Strategy Tester:  

#define count_symbol 3
string Symbols[count_symbol]={"CADCHF","GBPAUD","EURUSD"};
input int Fetch_Candles=1000;
input bool CallMyProgram= true;
input bool writedata = true;
input bool draw_charts = true;
input bool showbuffer1 = true,showbuffer2 = false;

int OnInit()
  {
   if(draw_charts){
   for(int i=0; i < count_symbol; i++) 
   {
  
   SymbolSelect(Symbols[i],true);
   chart_id[i] = ChartOpen(Symbols[i],0);
   int indicator = iCustom(Symbols[i],0,"Real Time Testing\\Trade_Real_Test",0,false,false,false);
   ChartIndicatorAdd(chart_id[i],1,indicator);
   ChartApplyTemplate(chart_id[i],"template.tpl");
   }
   }
   
   EventSetMillisecondTimer(10);
   return(INIT_SUCCEEDED);
 }

This code opens different chart with the respective symbols. But it doesn't work in the Strategy Tester. I could not see the respect charts open in the Strategy Tester with their respective Indicators. The code that I have placed above is of an indicator. I am backtesting the indicator. 

My humble request please read my question properly and ask the related questions, please.

Kindly, let me know what I have missed here.  I am calling the same indicator what I am testing on different chart with the respective parameters what I have fixed as you can see in the code. Also, I have the template placed on different charts.  


I have even tried removing the indicator line just applying the template so that I get the respective effect of indicator on it. Like the following:  

#define count_symbol 3
string Symbols[count_symbol]={"CADCHF","GBPAUD","EURUSD"};
input int Fetch_Candles=1000;
input bool CallMyProgram= true;
input bool writedata = true;
input bool draw_charts = true;
input bool showbuffer1 = true,showbuffer2 = false;

int OnInit()
  {
   if(draw_charts){
   for(int i=0; i < count_symbol; i++) 
   {
  
   SymbolSelect(Symbols[i],true);
   chart_id[i] = ChartOpen(Symbols[i],0);
   ChartApplyTemplate(chart_id[i],"template.tpl");
   }
   }
   
   EventSetMillisecondTimer(10);
   return(INIT_SUCCEEDED);
 }

Please help me people in a great dilemma.

jaffer wilson
918
jaffer wilson  
Can someone please help me?
To add comments, please log in or register