habibzadeh:
It's not a good idea. Use a timer.
Hello ,
I need to know how does GetTickCount function behave in Strategy Tester if we using it to deciding on the trades?
Thank you
habibzadeh:
Hello Angevoyageur ,
Thank you for the reply , Is it possible to define OnTimer function in the class not in the expert?
Does OnTimer works as expected in tester?
Regards
Please read the documentation : https://www.mql5.com/en/docs/basis/function/events#ontimer
See also this topic All (not yet) about Strategy Tester, Optimization and Cloud

Documentation on MQL5: Language Basics / Functions / Event Handling Functions
- www.mql5.com
Language Basics / Functions / Event Handling Functions - Documentation on MQL5

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
Hello ,
I need to know how does GetTickCount function behave in Strategy Tester if we using it to deciding on the trades?
Thank you