Yes; that would be nice; i want to double on this one....
See indicator Clock in Code Base - https://www.mql5.com/en/code/8075
Rosh,
thanks. I was able to extract the local time zone of my PC using the code you provided. However, there does not seem to be a way to get GMT offset of the broker by function. One can calculate it but it would be better if one had a function to retrieve it from the terminal since one can only calculate it during broker hours.
WRR
thanks. I was able to extract the local time zone of my PC using the code you provided. However, there does not seem to be a way to get GMT offset of the broker by function. One can calculate it but it would be better if one had a function to retrieve it from the terminal since one can only calculate it during broker hours.
WRR
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 not, could something to do this, be added to the next Build?
For example it would be great if a function or command such as MarketInfo(Symbol(),MODE_GMT); or something like that, was part of the MT4 coding language.
It would return an integer value of the offset in seconds (example: if broker is at GMT +1, the code would return 3600).
Calculating this offset from a known time can be done but it is not as good because charts can have time delays and down time, and the known time might not be synchronized or correct.
Also, is there a way to import the GMT offset of a local PC into the MT4 language, not by using TimeLocal() and comparing it to a known time but actually getting the offset value from the PC (e.g. -4 hours)?
If not, could this also be added to the next Build?
WRR