An MT4 EA server time problem often shows up as a one-hour mismatch. The robot opens late, closes early, or skips a session after daylight saving changes. That symptom can look like a faulty strategy, but the real issue is often the clock reference inside the rules.
This article stays focused on MT4 EA server time. The key question is which time basis the EA uses, and which one the broker server uses. Once you separate those references, you can define session rules that stay readable, verifiable, and less vulnerable to seasonal shifts.
Which Clock the EA Uses
An EA does not rely on one universal clock. It reads platform time functions, then applies your conditions. Therefore, the first task is to identify the time basis in the code, not just the clock shown on your computer.
In MT4, broker server time matters most for logic that depends on candle timing, session windows, or daily resets. However, a developer can mix server time with local time by mistake. That mix creates one-hour errors when daylight saving changes.
A proper review starts with every comparison that uses hours, minutes, or dates. First, check whether those comparisons use server time. Next, see whether any conversion happens before the filter runs. If so, the conversion rule should be explicit and documented.
Server Time and Local Time
Server time and local time are different references. Local time belongs to the computer that runs the terminal. Server time comes from the broker quote stream. Consequently, two machines can show different local clocks while the EA still follows the same server stream.
This matters when a trader expects a session rule to match the desktop clock. The EA may instead follow broker time, which can shift relative to local time. Therefore, a one-hour difference does not automatically mean the logic has failed.
For a clean review, write down which clock drives each rule. For example, entry filters can use server time, while logs may display local time for readability. However, mixing both in one comparison creates confusion, especially when a region enters or leaves daylight saving.
What TimeCurrent Means
TimeCurrent is the most relevant reference for broker server time in MT4 logic. The MQL4 Reference says it reflects the last known broker server quote time, not the computer clock. Therefore, it is the right starting point when you want the EA to follow market time.
That detail matters because TimeCurrent does not depend on the machine’s local settings. Instead, it follows the server-side quote context the terminal has received. If quotes stop, the value still reflects the last known server time, which affects how you interpret logs and timing checks.
A common mistake is assuming TimeCurrent equals the wall clock on the trading computer. It does not. Therefore, if an EA uses it for daily cutoffs or session windows, the rule should be written around server time, not the user’s local clock or timezone preferences.
Name the Time Basis in Session Rules
Session rules need a named time basis. Without that, the same instruction can mean three different things to three different people. For example, “trade London open” could mean broker server time, London local time, or the user’s computer time.
A better specification says exactly which clock controls the rule. You can define a session by server hours, then describe how those hours should behave across the year. This approach reduces misunderstandings and makes code review easier because the meaning is no longer implied.
If the rule depends on a calendar region, name that region too. For instance, a session linked to New York should say whether the EA uses New York civil time or a broker-server approximation. Otherwise, daylight saving changes can shift the effective trading window without any code change.
Daylight Saving Shifts Are Regional
Daylight saving does not move every region together. Some countries change clocks, some do not, and some change on different dates. Therefore, a broker server in one region may shift earlier or later than the trader expects.
That difference creates the classic one-hour surprise. An EA that was correct in winter can appear late after spring changes, or early after autumn changes. However, the code may still be functioning exactly as written. The mismatch comes from the time reference, not the order logic.
This is why seasonal changes deserve project notes. Record when the broker server offset changed, when the market session changed relative to your rule, and which region the rule refers to. A small note can prevent weeks of confusion later, especially when several people maintain the EA.
Why the Tester Can Mislead
The MT4 tester does not behave like the live platform in every time-related detail. MetaQuotes documents that in the Strategy Tester, TimeLocal, TimeCurrent, and TimeGMT coincide in simulated time. Therefore, a time filter that looks precise in testing may behave differently in live operation.
The tester also uses its own modeled environment. Standard MT4 testing relies on a selected spread and modeled ticks, not automatically real recorded ticks. Because of that, a timing rule that passes in the tester does not prove the same live entry moment or the same session alignment.
External communication is another limitation. WebRequest and several related functions do not execute in the tester. So if an EA depends on remote validation or external time checks, the backtest cannot fully represent the live setup. For more context, see the related guide mt4 backtest vs demo, which explains those environment gaps in a different way.
A Hypothetical Broker Move
Suppose a broker changes server offset after a platform migration. Before the move, a session filter that opens at 08:00 server time may have matched the intended market window. After the move, that same 08:00 may now land one hour away from the target session.
In this hypothetical case, the EA is not late because its signal logic failed. Instead, the time basis shifted underneath it. The orders still obey the code, but the code now maps to a different market hour. That is why a broker change often exposes hidden assumptions.
A review should compare the old and new server offsets, then compare the intended trading window. If the rule was written in local time, the broker move may require a conversion update. For a broader checklist after platform changes, the related guide Your MT4 EA Stopped After a Broker Change: Check These Details is the better next read.
Write a Verifiable Time Spec
A useful time specification should be testable by an owner who does not read the source code. Start with the clock reference, then define the active hours, the date range, and the daylight saving assumption. For example, “Use broker server time, trade from 07:00 to 10:00, and keep the window fixed to server time all year” is much clearer than “trade London morning.”
Next, describe whether the EA should ignore weekends, holidays, and rollover periods. These choices matter because session logic often interacts with daily bars and broker pauses. Also, if the rule depends on a symbol, state that directly so the trader knows whether it applies to all charts or only one chart.
Finally, keep the spec short enough to verify against logs. An owner should be able to compare a timestamped entry with the rule and decide if it is correct. That clarity helps developers too, because it separates a timing defect from a market-condition change or a data issue.
Ask for a Scoped Time Change
When the EA is off by an hour, ask for a scoped change instead of a guessed offset. A vague request like “fix the time” can lead to a patch that only works in one season. Instead, state the exact symptom, the server time used, and the time window that failed.
A precise request also helps the developer decide whether the adjustment belongs in inputs, constants, or session logic. For example, a broker-offset input can work in some designs, but not if the rule should follow server time directly. Therefore, the change should match the EA’s intended time model, not a random correction.
This is also where code ownership and access matter. Possession of an EX4 file does not establish the right to modify it, and an ex4 decompiler is not a legitimate shortcut for recovering source design. The safer route is to ask for a documented change in the code you are authorized to edit, then verify the time basis after deployment.
Keep Seasonal Notes With the Project
Seasonal observations are part of maintenance, not trivia. Keep a simple note for each year that records when the broker’s offset changed, when the session window drifted, and which market region the rule follows. That record helps explain future behavior without guesswork.
This note is especially useful when multiple symbols share one EA. Different instruments can run on different market rhythms, yet the same server clock governs them all. Therefore, a clear seasonal history helps distinguish a time issue from a symbol-specific trading condition or a chart setup difference.
If you review a live chart months later, the log may show only the server time that existed then. A project note fills the gap between that timestamp and the intended session rule. Also, if you want a practical example of how time mistakes appear after platform or broker adjustments, revisit the related guide mt4 ea broker change.
