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,
One thing I can't get my head around with MQL, is changes to broker server times (e.g. for daylight savings) and the impact on MQL functions and expert advisors.
I have several EA's that only trade at certain times of the day. I limit the trade times using either TimeCurrent(), or Hour() and Minute() functions, checking against some external values that I write in as extern inputs.
It says in the documentation that these functions will be reading in the broker server time. I've also found a TimeGMTOffset() function, that I thought I should be using but that talks about local computer time, rather than broker server time.
So few questions:
1) What is the best way to manage trading time settings on EA's when changes occur to broker server time?... Do you all adjust your time inputs/settings manually when the clocks change? or is there an automated way to have the EA figure it out itself?
2) What happens if there is a change to local computer time (on my VPS) how does that affect an EA?
Any advice much appreciated!
Thanks.