TrueTestHonest results, on the record.

EA trading at the wrong hour? Server time

EA Trade TesterDemo labHow we testFor AI agents

Published · methods v2.5 · by TrueTest

Your EA opens trades at 08:00. On your broker that was the London open. On another broker, or after the clocks change, the same 08:00 can be an hour or more away from it, and the EA trades a different market. This is one of the commonest hidden faults we see, and a backtest on one broker cannot show it.

Check my EA's clock freeSee a full example first

Drop your .mq5/.mq4 code, a Python bot or an MT5 report on the home page. The first read takes seconds and needs no sign-up; the lab verdict is free too. Only the detailed technical report is paid (the full PDF report is GBP 49). The price shown is the total price: no VAT is added. TrueTest is not VAT-registered in the UK. We read your code as text and never run it as given; an outside AI service drafts the rule card only if you tick the box (see Security). Not financial advice.

What is broker server time?

MT4 and MT5 show prices in the broker's server time, not yours. Many brokers use New York + 7 hours, so the trading day rolls over at 00:00 server time, which is 17:00 in New York. In UK terms that is usually UK + 2 hours, and UK + 3 hours in the weeks when only the US has moved its clocks (in 2026: 8 to 28 March and 25 October to 1 November). Other brokers use GMT, GMT+2 fixed, or other offsets.

How does it break an EA?

CodeWhat happens
input int StartHour = 8; and the server clock8 means 06:00 UK on a New York + 7 broker and 08:00 UK on a GMT broker: two different sessions
TimeLocal()uses the clock of the computer running MT5; on a VPS in another country it changes again
TimeGMT() in the Strategy Testerderived from the server time in the tester, so a GMT-based rule can be wrong in backtests
Mixed clockshours compared across clocks shift with the broker's time zone and daylight saving

How do we test for it?

The first read flags fixed session hours with no GMT offset or daylight-saving handling, and every TimeLocal() / TimeGMT() use. In the lab, the clock sweep runs the rules with the clock moved from -3 to +3 hours. If the result only works at one exact clock, the edge may be an accident of one broker's time zone. The clock sweep is shown for information: it does not fail a test by itself.

How do I make an EA clock-safe?

Related pages

More guides: Is my EA backtest real or luck? · MT5 Strategy Tester report checker · Is my EA martingale or grid? How to tell · How to test a gold (XAUUSD) EA properly · How many backtests? Overfitting explained · TrueTest vs StrategyQuant, Forex Tester, MT5 · Why live results are worse than the backtest · Does my EA repaint or look ahead? · Can a scalping EA make money after costs? · Does my EA make money every year? · Will my EA pass a prop-firm challenge? · What to check before you buy an EA

Questions people ask

Why does my EA work in the tester but trade at odd hours live?

Often a clock: the tester uses the server time of its history, while TimeLocal() or a VPS clock is different live.

What time zone are your tests in?

Our prices are on FxPro server time (New York + 7 hours), the same for every period.

Does the clock sweep fail my EA?

No. It is shown for information; it tells you how much the result depends on the exact clock.

Is this financial advice?

No. It is about how code reads time. Not financial advice.