Maybe you show us first and usually others might improve it. If it is not that hard.
API call to server
http://api.timezonedb.com/?zone=Australia/Melbourne&key=<Your_API_Key>
</result>
Question" best approach to make the call from within MT4 and import the data
API call to server
http://api.timezonedb.com/?zone=Australia/Melbourne&key=<Your_API_Key>
</result>
Question" best approach to make the call from within MT4 and import the data
Using JavaScript Object Notation via browser
http://api.timezonedb.com/?zone=Australia/Perth&format=json&key= myAPIkey
=> {"status":"OK","message":"","countryCode":"AU","zoneName":"Australia\/Perth","abbreviation":"AWST","gmtOffset":"28800","dst":"0","timestamp":1421017908}
OR
http://api.timezonedb.com/?zone=Europe/London&format=json&key=myAPIkey
=> {"status":"OK","message":"","countryCode":"GB","zoneName":"Europe\/London","abbreviation":"GMT","gmtOffset":"0","dst":"0","timestamp":1420989442}
OR (this time note dst)
http://api.timezonedb.com/?zone=Australia/Sydney&format=json&key=myAPIkey
=> {"status":"OK","message":"","countryCode":"AU","zoneName":"Australia\/Sydney","abbreviation":"AEDT","gmtOffset":"39600","dst":"1","timestamp":1421029111}
Some work on a JSON parser link https://www.mql5.com/en/code/11134
and XML parser https://www.mql5.com/en/articles/1366
https://www.mql5.com/en/code/1998
Question is how to send and import result into MT4 string variable.
Is it better to import XML or JSON
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Has anyone a code snippet to share that can pull the current time of a city from some available server (whatever that may be) , including dst if applicable.
This information is obviously available from many servers eg http://www.timeanddate.com/clocks/free.html http://www.timeanddate.com/services/api/ the issue is the most effectice method of extracting the data and importing into MT4.