Thank you for your article,
I was coding some functions and was stuck on some of the time functions and didnt know how to approach it.
I hope in the future there are more articles on more of the basics of the language and they are extended upon.
Most of my time is spent on creating simple function based the bare bones functionality that is currently present. Its nothing bad I actually enjoy expanding my understanding its really hard to find basic laymen concepts sure the AI and other functionality is great but most of us are normal people working and on the side trading and if the understand was easier to understand more people would want to use the platform the sentiment that i get from forums and other is that well not not talk about it. Thank you for your contributions I hope there is more information like this to come a redo of articles of just the basics is what I really desire and this is high on the list of really good explainations of functions and uses..
Thank you for your article,
I was coding some functions and was stuck on some of the time functions and didnt know how to approach it.
I hope in the future there are more articles on more of the basics of the language and they are extended upon.
Most of my time is spent on creating simple function based the bare bones functionality that is currently present. Its nothing bad I actually enjoy expanding my understanding its really hard to find basic laymen concepts sure the AI and other functionality is great but most of us are normal people working and on the side trading and if the understand was easier to understand more people would want to use the platform the sentiment that i get from forums and other is that well not not talk about it. Thank you for your contributions I hope there is more information like this to come a redo of articles of just the basics is what I really desire and this is high on the list of really good explainations of functions and uses..
Can a broker make trades appear in MT5 1 hour before the real London market, for example? In my case, in meta trader 5 I get the time of each trade 1 hour before London time, which is where the trade is executed.
It depends on the symbol forex cfd are tradable from Su. 23:00 to Fri. 23:00 according to time and broker.
The time in the terminal is that of the location of the server, that is to say, if the broker is located in London, but the server is in Luxembourg for example, the time zone is different. It has always been and will always be like that.
The time zone in the terminal is that of the server location, i.e. if the broker is located in London, but the server is in, for example, Luxembourg, the time zone is different. It has always been and will always be like that.
Thank you very much, I am verifying if the trader is real, today I checked and the prices of the cfds reported in the operations, taking into account the time difference mentioned before, if they coincide with the values of London market charts that I consult today.
Send me by private message more information about that broker and I can tell you if it is regulated, etc.. Such discussions are forbidden here on the forum.
Brilliant article and help! I wasted many months looking at test results that just were invalid.
There should be any hint if the tester is used: "Take care with time dependend strategies in the tester.. " something like that. How could one know?
I think in the first table with the time zones and acronyms you mean "New York, summer time" in row 3 (EDT, UTC-4), not New York, normal time.
Thank you very much, but I won't change anything here as the calculation of some of the integrated functions has been changed (I assume in the context of the extended use of matrices and vectors) I posted a new version of all functions and macros and one more here: https://www.mql5.com/en/code/45287.
And there are two programs to test und check the way it works and can be used.

- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article Dealing with Time (Part 1): The Basics has been published:
Functions and code snippets that simplify and clarify the handling of time, broker offset, and the changes to summer or winter time. Accurate timing may be a crucial element in trading. At the current hour, is the stock exchange in London or New York already open or not yet open, when does the trading time for Forex trading start and end? For a trader who trades manually and live, this is not a big problem.
As said, traders who sit in front of the screen to buy and sell can easily handle the different times. Be it via the internet or certain functions, values or clocks that the PC keeps available and that can be retrieved at any time with MQL functions like TimeGMT(), TimeGMTOffset() and others. The situation is different if one wants to write and test a trading program with historical data that trades time-related. Actually, analogous to live trading, the question should be just as easy to answer.
Starting from UTC (Universal Coordinated Time) or Greenich Mean Time (GMT, https://greenwichmeantime.com/what-is-gmt/), one would simply have to add the geographic or instrument-related time shift and one would know what time it is where. But it is not that simple. There is the changeover of winter and summer time (DST or Daylight Saving Time), which, depending on the time, adds or subtracts 1 hour. However, not uniform, but each country or region such as Europe has its own definition, sometimes constant for years (EU and USA) or changed every now and then as in Russia, where it was abolished in 2014. In the EU, there was a discussion in 2018, including a survey on the question of abolishing the annual time change (https://ec.europa.eu/germany/news/20180831-konsultation-sommerzeit_de), which resulted in a majority in favor of abolition, so that the Commission submitted a legislative proposal for the end of the time change (https://ec.europa.eu/germany/news/20180914-kommission-gesetzesvorschlag-ende-zeitumstellung_de), which then came to nothing again.
Author: Carl Schreiber