Multi Currency Experts Back Testing Problem

 

Hello everyone,

 I know this topic has been discussed but of late I could not find any updates on the issue.  The problem is back testing multi currency experts gives different results when tested on different currencies.  The difference is MAJOR, otherwise this would not have been a problem.  I know ticks on each currency pair is not the same, but even if only trading at the start of each bar the same problem shows its ugly face again.

I have read that it has something to do with the synchronization of the bars, but not sure how to bypass this problem.  I found code like the following:

   
   string Symbols[3];
   
   Symbols[0] = PAIR1;
   Symbols[1] = PAIR2;
   Symbols[2] = PAIR3;
   

   int N = 2;
   int RoundNum;
   
   ENUM_TIMEFRAMES TimeFrame = _Period;
   
   int i;
   datetime dta[1];
   static datetime LastBarTime;
   
    // pair 0 (among N) is the "driver"
   CopyTime(Symbols[0],TimeFrame,0,1,dta);
   if (dta[0] != LastBarTime) {
   RoundNum++;
   //Print("Debug --- Round ",RoundNum);
   LastBarTime = dta[0];
   for (i=0; i<=N; i++) {
   CopyTime(Symbols[i],Period(),0,1,dta);
   //Print("Debug --- Symbol ",Symbols[i]," : Time ",dta[0]);
   }
   
//Do stuff here

   }

 The above code helps, but it is not a perfect fix.

If anyone can contribute to this problem please do so!

Thanks! 

 
Saidar:

Hello everyone,

 I know this topic has been discussed but of late I could not find any updates on the issue.  The problem is back testing multi currency experts gives different results when tested on different currencies.  The difference is MAJOR, otherwise this would not have been a problem.  I know ticks on each currency pair is not the same, but even if only trading at the start of each bar the same problem shows its ugly face again.

I have read that it has something to do with the synchronization of the bars, but not sure how to bypass this problem.  I found code like the following:

 The above code helps, but it is not a perfect fix.

If anyone can contribute to this problem please do so!

Thanks! 

Please write to servicedesk. Provide your EA and full description of your problem.

Get in touch with developers using Service Desk!
  • www.mql5.com
We therefore attach great importance to all user reports about issues in our programs and try to answer each one of them.
Reason: