iClose() issue when backtesting Vs. forward testing

To add comments, please log in or register
David McCollum
33
David McCollum  

Hello,


If I include the statement : Print("EURUSD Close :: ", DoubleToStr(iClose("EURUSD",PERIOD_M30,0),Digits) in an EA, and attach the EA to a forward tested GBPUSD chart, the Ea prints the correct iClose value for the EURUSD.


But....


If the same EA is backtested on a GBPUSD chart, (for the duration if the current bar), the iClose value is always reported as the respective Open for the EURUSD. In other words, the iClose value for the EURUSD never updates as the backtested GBPUSD chart receives new ticks. The iClose value for the EURUSD updates only once when a new GBPUSD bar appears.


Does anyone know of a solution to this issue?


MANY THANKS !!!


Regards,


DMMcCollum



Philippe
201
Philippe  

Hi

Have you check your archives for EURUSD ? May be you havn't data under M30 timeframe.

Phil

David McCollum
33
David McCollum  
Matutin:

Hi

Have you check your archives for EURUSD ? May be you havn't data under M30 timeframe.

Phil

Hello,


Yes, the History Center has updated and loaded EURUSD data for all timeframes.

Regards,


DMMcCollum

Paul
746
Paul  
DMMcCollum wrote >>

Hello,


If I include the statement : Print("EURUSD Close :: ", DoubleToStr(iClose("EURUSD",PERIOD_M30,0),Digits) in an EA, and attach the EA to a forward tested GBPUSD chart, the Ea prints the correct iClose value for the EURUSD.

But....


If the same EA is backtested on a GBPUSD chart, (for the duration if the current bar), the iClose value is always reported as the respective Open for the EURUSD. In other words, the iClose value for the EURUSD never updates as the backtested GBPUSD chart receives new ticks. The iClose value for the EURUSD updates only once when a new GBPUSD bar appears.


Does anyone know of a solution to this issue?


MANY THANKS !!!


Regards,


DMMcCollum



Multi-pair backtesting on MT4 will only use the fractal ticks for the main chart pair, and the other pairs will be open price only. It is possible to re-write the EA and the indicators it uses to work on 1M charts, which will mean that the other pairs are at most 1 minute out of date rather than half an hour in your example.

Paul

http://paulsfxrandomwalk.blogspot.com/

David McCollum
33
David McCollum  
phampton:

Multi-pair backtesting on MT4 will only use the fractal ticks for the main chart pair, and the other pairs will be open price only. It is possible to re-write the EA and the indicators it uses to work on 1M charts, which will mean that the other pairs are at most 1 minute out of date rather than half an hour in your example.

Paul

http://paulsfxrandomwalk.blogspot.com/

Thanks for the reply Paul. Your post confirmed my suspicion.


Thanks again!


DMMcCollum

To add comments, please log in or register