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 it's any consolation, The developer of MQL5 fortunately address this. :)
Up to a point. The documentation strongly implies that this is returning GMT based on the local computer clock. Gordon's already expressed some reservations about this.
Up to a point. The documentation strongly implies that this is returning GMT based on the local computer clock. Gordon's already expressed some reservations about this.
GMT offset and DST problems are not that easy to solve I agree. I personally haven't test or study it more thoroughly or encounter the need for it's precise calculations for that matter.
I know I've read some elaborate codes regarding this... Fwiw, here are some resources I've found.
- New very cool candle time - Forex Factory
- Search result of 'clock' from FF
On a lighter note... maybe MT5 developers are waiting for an automatic catch-all solutions from us :))))
On a lighter note... maybe MT5 developers are waiting for an automatic catch-all solutions from us :))))
Well, Forex Megadroid publishes a time signal for use by its EA at http://www.forex-megadroid.com/timetest.php. For as long as that website continues to exist, you could read their time signal using one of the HTTP libraries on this forum. Note that it's only specified to the minute; the EA presumably uses this to establish the broker's offset by rounding the difference in seconds to the nearest 30 minutes (or 15 minutes, in case the broker is based in Kathmandu).
Or you could run your own time signal from your own web server.
This is not too light a note maybe... From the banner and slogan they apparently do waiting for our suggestions...
... http://www.forex-megadroid.com/timetest.php. ...
now hopefully Rosh or Stringo will have a say for this thread...
Jjc, what about atomic clock sync... I've read it somewhere. It suppose to be dedicated and more reliable I think...
there are also public time servers accessible through the ntp protocol.
Er, see above. Personally, I wouldn't want the job of writing MQL4 code to talk to an NTP server. And the accuracy of NTP shouldn't be necessary when there's already meant to be an accurate time signal coming in from the broker. All you should need is a GMT offset, not a complete replacement GMT timestamp.
Er, see above. Personally, I wouldn't want the job of writing MQL4 code to talk to an NTP server. And the accuracy of NTP shouldn't be necessary when there's already meant to be an accurate time signal coming in from the broker. All you should need is a GMT offset, not a complete replacement GMT timestamp.
Or maybe It's been done in MT5?
There's also the 'more popular' request to have the chart Time axis to be offset-able by user...
Pass on that.
Going back to the other issue, if you want to run a time service for EA users then all you need is a server with a reasonably accurate clock and web server software such as Microsoft IIS. Example ASPX code for returning a GMT timestamp would then be as follows:
You could then use this to get the offset between broker time and GMT using one of the HTTP libraries on this forum. For example, using http51.dll, you could do the following:
Going back to the other issue, if you want to run a time service for EA users then all you need is a server with a reasonably accurate clock and web server software such as Microsoft IIS. Example ASPX code for returning a GMT timestamp would then be as follows:
You could then use this to get the offset between broker time and GMT using one of the HTTP libraries on this forum. For example, using http51.dll, you could do the following: