I'm currently using TimeLocal(); function to get the time of the local computer. I use it to determine the trading session for the EA. Does this function works the same way in strategy tester because time is modeled in strategy tester. should I use another function instead of TimeLocal(); ?.
- Time management in the tester: timer, Sleep, GMT
- Date and Time
- Date and Time - TimeLocal
Hapu Arachchilage Tharindu Lakmal:
Does this function works the same way in strategy tester because time is modeled in strategy tester
Does this function works the same way in strategy tester because time is modeled in strategy tester
https://www.mql5.com/en/docs/dateandtime/timelocal
During testing in the strategy tester, TimeLocal() is always equal to TimeCurrent() simulated server time. Hapu Arachchilage Tharindu Lakmal:
I'm currently using TimeLocal(); function to get the time of the local computer. I use it to determine the trading session for the EA. Does this function works the same way in strategy tester because time is modeled in strategy tester. should I use another function instead of TimeLocal(); ?.
I'm currently using TimeLocal(); function to get the time of the local computer. I use it to determine the trading session for the EA. Does this function works the same way in strategy tester because time is modeled in strategy tester. should I use another function instead of TimeLocal(); ?.
Better use TimeGMT together with my library. https://www.mql5.com/en/code/48291

TimeGMT library for the strategy tester
- www.mql5.com
Static class to fix the TimeGMT() function during testing in the strategy tester.

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