When I backtest the EA, why there is error?

 

Hi guys,

   When I try back test the following EA, there is error saying that
   "TestGenerator: unmatched data error (low value 1.33456 at 2013.01.15 08:00 and price 1.33430 mismatched)"
   Is the error come from the Close[] array?
   What's wrong with that? Can anyone give kind help? Thanks.

Hi guys,

   When I try back test the following EA, there is error saying that 
   "TestGenerator: unmatched data error (low value 1.33456 at 2013.01.15 08:00 and price 1.33430 mismatched)"
   Is the error come from the Close[] array?
   What's wrong with that? Can anyone give kind help? Thanks.

Int start()
  {
    for (i=2;i<=N_bars+2;i++)   
         {                                                  
         changesum = MathAbs(Close[i+1]-Close[i]) + changesum;               
         }
    avgchange = changesum/N_bars;
    if (MathAbs(Close[2]-Close[1]) >= avgchange*N_SD)                    
         {
         Deviation = true;     
         return;                                                          
         }
  }
 
chapmann:

Hi guys,

   When I try back test the following EA, there is error saying that
   "TestGenerator: unmatched data error (low value 1.33456 at 2013.01.15 08:00 and price 1.33430 mismatched)"

The problem lies with your historical data.  You have bars on different timeframes where their Low does not match,  for example,  if the low of a H1 bar is 1.33456 and the lowest value of the M5 bars within that hour is 1.33430 then there is something wrong with your data,  there is a mismatch,  why ?
 

OK thanks. I know the problem.

There should either one record is wrong. If the low of a H1 bar is 1.33456 is true, then it is impossible that the lowest value of the M5 bars within that hour is 1.33430. It should be 1.33456, right?

In order to fix it, can I update my history database by importing the M1 data (downloaded from this https://www.mql5.com/en/forum/134765 website) into the H1 database???

 
chapmann:

OK thanks. I know the problem.

There should either one record is wrong. If the low of a H1 bar is 1.33456 is true, then it is impossible that the lowest value of the M5 bars within that hour is 1.33430. It should be 1.33456, right?

In order to fix it, can I update my history database by importing the M1 data (downloaded from this https://www.mql5.com/en/forum/134765 website) into the H1 database???

Your H1 data has to match your M1/M5 etc data,  what you should ideally do is create the other timeframes from the M1 data then they will all match,  use periodconverter to do it.
 

Thanks.!

 Where can I find the periodconverter? 

 
chapmann:

Thanks.!

 Where can I find the periodconverter? 

You should find under scripts in MT4  ;-)
 
RaptorUK:
You should find under scripts in MT4  ;-)
Thanks RaptorUK :)))