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
If you compare:
https://www.mql5.com/en/docs/dateandtime
and
https://docs.mql4.com/dateandtime
https://www.mql5.com/en/docs/dateandtime/timetradeserver
is an API that you might need for MT4
The timezone would be not an issue if server would send its timezone properly, maybe through additional "Account Properties" or whatever logical properties
https://www.mql5.com/en/docs/constants/environment_state/accountinformation#enum_account_info_string
Regarding backtesting or other "non-live" operational... just do it in server timezone but display it in localtime.
Let's not overcomplicated stuffs....
TimeTradeServer seems to be useful for compensating for TimeCurrent's intra-tick variability (e.g. use TimeTradeServer vs TimeCurrent in OnTimer).
But I am not sure if it provides any additional information beyond TimeCurrent for purposes of determining the Server's DST?
Totally agree about the usefulness of additional MQL functions about the server's time base, specifically the server's GMT hours/minutes offset and which DST plan it follows if any (e.g. none, EST, EET, AEST etc).
Not GMT, just NY+7/GMT+2. Because it's Tel Aviv time and it's the bankster capital.
FX markets trading days start and end at Tel Aviv Midnight, all other American and worldwide non-24/5 markets' trading days either start or end at that time.
Wrong. #4 first point. Tel Aviv is currently IDT/NY+7/GMT+3, so they correspond. Wait until IST (Oct 28) when Israel changes but NY doesn't (until Nov 4.)
Agreed, server time would need to use EST's DST.
If you want to have a server time base to be a consistent offset from NY time, which is EST, then your server needs to be adjusting based on EST's DST.
And if you want to have the server time have its 12:00 roll-over correspond with NY close (5pm EST), then server needs to be GMT+2/EST+7.
So when the server uses GMT+2 and EST's DST, then it will always be NY+7, and will thus always have the NY 5pm close roll-over at midnight server time for all days in the year.
However still wondering: anyone aware of a simpler way to determine the server's GMT shift and DST policy than parsing through historical Friday close times data ?
Agreed, server time would need to use EST's DST.
If you want to have a server time base to be a consistent offset from NY time, which is EST, then your server needs to be adjusting based on EST's DST.
And if you want to have the server time have its 12:00 roll-over correspond with NY close (5pm EST), then server needs to be GMT+2/EST+7.
So when the server uses GMT+2 and EST's DST, then it will always be NY+7, and will thus always have the NY 5pm close roll-over at midnight server time for all days in the year.
However still wondering: anyone aware of a simpler way to determine the server's GMT shift and DST policy than parsing through historical Friday close times data ?
OK, since no one has responded with implementation suggestions, I presume, unfortunately, that there is no simple way to determine MT4 Server's GMT shift and DST policy individually.
So analyzing the historical data to determine this it is...
On mt5 its easy, the charts you are see are ticked base, so you can create your own chart on your own timeframe