EventSetTimer and the Backtest speed

 

Hi,

When I use the EventSetTimer in any EA that uses an indicator the time required to do a backtest is highly increased even if the OnTimer event function is empty.

If the EA uses no indicador I feel no difference and It 's specially noticed when the indicador has heavy calculations.

Looks like the OnTimer forces the indicators to recalculate even if no new tick occurs.

This is a bug or a feature? Or am I doing something wrong? 

 
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---> check for tester
   if(MQLInfoInteger(MQL_TESTER)==0)
     {
//--- if not tester, create timer
      EventSetTimer(5);
     }
//--->
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
 
Marco vd Heijden:

Thank you, but I need the timer on the backtest, that's not what I'm looking for.

I'm trying to understand why a timer set on the EA to an empty function is forcing the indicator to recalculate.

Reason: