Why can't I change the time zone? - page 2

To add comments, please log in or register
Soewono Effendi
171
Soewono Effendi  

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.... 

Documentation on MQL5: Date and Time
Documentation on MQL5: Date and Time
  • www.mql5.com
This is the group of functions for working with data of datetime type (an integer that represents the number of seconds elapsed from 0 hours of January 1, 1970).
albry
49
albry  

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). 

kypa
983
kypa  
whroeder1: NY+7 or GMT are both reasonable timestamps.

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.

whroeder1
17941
whroeder1  
kypa: 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.)

albry
49
albry  

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 ?

albry
49
albry  
albry:

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...

12
To add comments, please log in or register