Educational note, not a trade setup. The lines on this chart mark times, not entries or targets.
CONTEXT
An Expert Advisor with a session filter can trade an hour outside its window after a clock change, with no error and no warning. One cause is a fixed GMT offset in the time calculation. TimeCurrent() returns the broker's server time, not GMT. On a broker that runs GMT+3 in summer and GMT+2 in winter, server time 10:00 means 07:00 GMT in summer and 08:00 GMT in winter.
WHAT THE CHART SHOWS
This example EA is meant to trade London, 08:00 to 16:00 GMT (lines A). Its offset was set in summer:
datetime gmtTime = TimeCurrent() - 3 * 3600;
Now the server runs GMT+2. At 08:00 GMT the server reads 10:00, the code computes 07:00, and the filter stays closed. The EA trades from 09:00 to 17:00 GMT (lines B), one hour late, until the next clock change. The reverse also happens: an offset of 2 set in winter opens one hour early in summer.
HOW TO CHECK YOUR OWN EA
1. Search the source code or inputs for fixed offsets: +2, +3, or any * 3600 in the time logic.
2. If the EA logs its session boundaries, read those logs for the week after a clock change.
3. Backtest across the last change, in late March or late October, and look for entries one hour away from the expected time.
Also look for TimeLocal(). It returns the clock of your PC or VPS, so a filter built on it can shift when the EA moves to another machine.
IF YOU FIND IT
Changing the offset in the inputs buys six months, until the next clock change. A lasting fix derives the offset from the broker's own data, with no offset to update.
RISK
Education only, not financial advice. Test any change on a demo account before using it live. Trading involves risk.

新评论