Broker server time and daylight saving: why your EA trades at the wrong hour
An expert advisor that trades at set hours reads the time from your broker's server. That clock is not your clock, and it is not New York's either. For a few weeks every year, a program that assumes a fixed offset trades one hour off. Here is why, and how to check yours.
Every chart shows the broker's server time
The times on a MetaTrader 5 chart, in the Market Watch and in the trade history are the time of the broker's trade server. Your computer's clock does not change them. So does a program that asks for the current time: it gets the server's answer.
Brokers choose their server clock freely. The three you will meet most often:
- UTC all year. Common at futures brokers. The clock never changes.
- GMT+2 in winter, GMT+3 in summer, following US summer time. Common at Forex and CFD brokers. It is chosen so that the trading week closes at midnight on the server, at 17:00 New York, all year.
- GMT+2 in winter, GMT+3 in summer, following European summer time. Looks the same as the previous one for most of the year, but switches on different dates.
The weeks when a fixed offset is wrong
The United States starts summer time on the second Sunday of March and ends it on the first Sunday of November. Europe and the UK start on the last Sunday of March and end on the last Sunday of October. Between those dates there are two gaps of two to three weeks a year:
- from mid-March to the end of March;
- from the end of October to the start of November.
In those weeks New York is four hours behind London instead of five. A program that converts server time to New York time with a fixed number, or with the wrong summer-time rule, opens and closes its trades one hour early or late. On a strategy built around the New York open, that hour is the whole trade.
How to check your broker's clock in two minutes
- Compare the clocks. Look at the time in the Market Watch window and compare it with UTC. The difference is your broker's offset today.
- Find the weekly close. Open an H1 chart of a symbol that trades until Friday evening and find the last bar before the weekend. At most brokers the week closes at 17:00 New York. If the last bar ends at 00:00 on the server, the broker follows the New York close; if it ends at 22:00 or 21:00, the server is on UTC.
- Check a spring week. Look at the weekly close in the second half of March. If it moved by an hour on the second Sunday of March, the server follows US summer time; if it moved on the last Sunday, it follows European summer time; if it never moved, the clock is fixed.
Our free indicator Broker Clock and New York Session on the MQL5 Market does these checks for you: it reads the offset from the terminal and from the weekly closes in the price history, tells you which rule the server follows, and warns you if the two disagree.
Three common mistakes
- Setting the offset once and forgetting it. It is right for most of the year and wrong exactly in the weeks above.
- Trusting the computer's time zone. MetaTrader 5 computes GMT from your computer's clock and time zone. If either is wrong, the offset it reports is wrong too. Check that Windows shows the correct time and zone, especially on a VPS.
- Assuming the Strategy Tester knows the offset. In the tester, the "GMT" time a program can read simply repeats the server time. A program that needs the real offset in a backtest has to work it out from the price history.
What our program does
Opening Bell Algo for MT5 expresses all its trading hours in New York time. It detects the broker's offset automatically, live from the terminal and in the Strategy Tester from the weekly closes, and it shows the broker clock and the New York time on its panel, so you can compare them with a reliable clock. You can also set the offset by hand. See how it works and installation & settings.
This guide is general information, not investment advice. Trading leveraged products carries a high risk of loss. See our risk disclosure.