Strategy optimization result do not match single run test result - page 7

 
Alain Verleyen #:
Thank you.

I've found out that the wrong use of the GetTickCount() function was the root cause of my inconsistent results. Instead I had to use TimeCurrent() to check the status of an pending order x seconds after placing it.

Two remarks:
Not sure why this wasn't an issue in older MT5 versions. 
This seems only an issue in testing. In live trading GetTickCount() worked fine.

Hopefully this finding might help those who made the same coding mistake.

 
virtualreal #:

This seems only an issue in testing. In live trading GetTickCount() worked fine.

GetTickCount is a system real timer, while the tester simulates internal timing based on history of ticks and their playback (in visual or fast mode). During one tick of the real timer the tester can replay a thousand of historical ticks.

TimeCurrent is simulated by the tester.

 
Stanislav Korotky #:

GetTickCount is a system real timer, while the tester simulates internal timing based on history of ticks and their playback (in visual or fast mode). During one tick of the real timer the tester can replay a thousand of historical ticks.

TimeCurrent is simulated by the tester.

Thank you for your clear explanation.