You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.
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.
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.