BUG REPORT (Backtesting complete different results using multi strategy or multi symbol EAs)

 

Dear @MetaQuotes Support and @MetaQuotes,


I´ve found a bug when my EA using multi strategy and the same problem when another EA using multi symbol on Strategy Tester.

In both cases I´m getting symbols from an input. Because both using many differents symbols.


As you can see below. I am using two differents symbols. My entire EA code and my indicators are using symbol from input parameters. In no one moment there are refering _Symbol from chart´s symbols.


Check out my input parameters:


But, when in settings I am using another symbol, the results in backtest change, as you can see below.


USING THE SAME SYMBOL AS IN INPUT:



WITH ANOTHER SYMBOL (EQTL3, WDO$N) every symbol come with a complete different result.


This issue destroy any portfolio bot.

Could you pls, help me? How can I fix it? Or you need to fix this issue in the Metatrader Platform?


Best Regards,

Bruno

 
The OnTick function gets called only for the one symbol you are running the test on. So maybe thats the difference.
 
I'm having the exact same issue here... When I try to run EAs with the symbols coming from an input, I get different results each time I change the "main" symbol of the tester.
Also, when I run tests through "all the market watch" list, there are a lot of tests that are incorrect. 
 
trustfultrading #:
The OnTick function gets called only for the one symbol you are running the test on. So maybe thats the difference.

Not maybe, this IS the reason. 


Either Poll or use an indicator on the other symbols to pass ticks through chartevent.

 
trustfultrading #:
The OnTick function gets called only for the one symbol you are running the test on. So maybe thats the difference.

In my case, I´ve used in OnTime normally in another EA with 1 strategy but many Symbols.

In that Print above that EA with 7 strategies, I´ve made using classes as objects, running in OnTick as you can see in below code.


But in both cases, I have the same problems.


void OnTick() {
   static datetime last_day   = 0;
   datetime current_day       = iTime(_Symbol, PERIOD_D1, 0);

   if (last_day != current_day) {
      last_day   = current_day;
    
      if(!_ea1.CheckPassword(PASSWORD_p)) {
         Alert("Data Expirada ou Limite Financeiro atingiu o máximo.");
         ExpertRemove();
      } 
   }
   
   if (USE_EST_1) _ea1.onTick();
   if (USE_EST_2) _ea2.onTick();
   if (USE_EST_3) _ea3.onTick();
   if (USE_EST_4) _ea4.onTick();
   if (USE_EST_5) _ea5.onTick();
   if (USE_EST_6) _ea6.onTick();
   if (USE_EST_7) _ea7.onTick();
   
}


void OnTradeTransaction(const MqlTradeTransaction& trans,
                        const MqlTradeRequest& request,
                        const MqlTradeResult& result) {
   if (USE_EST_1) _ea1.onTradeTransaction(trans,request,result);
   if (USE_EST_2) _ea2.onTradeTransaction(trans,request,result); 
   if (USE_EST_3) _ea3.onTradeTransaction(trans,request,result);
   if (USE_EST_4) _ea4.onTradeTransaction(trans,request,result);
   if (USE_EST_5) _ea5.onTradeTransaction(trans,request,result);
   if (USE_EST_6) _ea6.onTradeTransaction(trans,request,result); 
   if (USE_EST_7) _ea7.onTradeTransaction(trans,request,result); 
   
   _panel.CalcVolume();
   _panel.Update();
}