Page 1 of 1

Session allowlist in code: Asia off, London on

Posted: Tue Sep 22, 2026 12:52 pm
by LondonScalper
Session allowlist in code sounds cold; it saved me from overnight improvisation.

I keep a simple gate: Asia mostly off for my discretionary FX book, London on, overlap on with tighter filters, late NY reduced. The code — or even a rigid spreadsheet flag — removes the debate at 03:00 when a candle looks "too good."

Why allowlist beats willpower
  • Off means off: platform alerts do not become entries
  • On still requires spread and news checks — allowlist is necessary, not sufficient
  • Changes to the list happen on Sunday review, not mid-trade
Automation here is about forbidding sessions, not finding magical entries.

If you use an allowlist (code or paper), which session did you turn off first, and did expectancy improve after costs?

When I temporarily enable Asia for a research block, it gets an end date in the same config. Open-ended exceptions are how allowlists die. Research that never expires becomes the new default book.

Code does not remove judgment inside allowed sessions — it only stops me inventing a new session policy at three in the morning.

Re: Session allowlist in code: Asia off, London on

Posted: Mon Oct 12, 2026 10:55 am
by Fairman
LondonScalper wrote: Session allowlist in code sounds cold; it saved me from overnight improvisation.
One thing to check if the allowlist runs in an EA: which clock it uses. Most MT4 and MT5 servers sit on GMT+2 in winter and GMT+3 in summer, following US daylight saving so the New York close is always midnight. A rule written as London on from 10:00 server time is right most of the year, but in the weeks when the UK and US change clocks on different dates it's an hour off against London. That's this month: from 26 to 30 October London has moved and New York hasn't. The cleaner fix is to convert server time to UTC in the code, then to London time with the UK rules, and define the sessions in London time. Or at least print the computed London time to the log each morning so any drift shows up straight away.

Re: Session allowlist in code: Asia off, London on

Posted: Tue Oct 13, 2026 1:36 am
by Shadow Trader
Fairman's clock point is the one that bit me, and October is actually the milder of the two gaps. In spring the US moves on the second Sunday of March and the UK on the last, so the mismatch can run two or three weeks.

There's a second trap if you backtest the allowlist. In the MT5 tester, TimeGMT() simply returns the simulated server time, so code that relies on it to find UTC looks fine live and quietly shifts every session in a test.

My fix was a small function with the server offset rules written out by hand, GMT+2 or GMT+3 depending on the US dates, then the UK rules on top. Ugly, but it gives the same answer live and in the tester, and the morning log line Fairman suggests confirms it.

As for which session went first, for me it was late NY after 17:00 London. Expectancy there was slightly negative after costs, mostly from spreads widening into the rollover hour.

I like the end date on research blocks, and mine goes one step further, the EA refuses to load once the research date has passed. When you run the allowlist on paper rather than in code, how do you handle those mismatch weeks?

Re: Session allowlist in code: Asia off, London on

Posted: Thu Oct 15, 2026 10:46 pm
by Shadow Trader
LondonScalper, one gap in a pure session allowlist is that it knows the clock but not the calendar. On the last UK bank holiday my gate saw a normal Monday at 08:00 London and let the EA trade a session with half the usual liquidity.

It took 4 tickets that morning, and the spread at the open ran near double its usual level. Nothing dramatic happened, but those trades would never have passed my manual checks.

So the config now has a short dated list of closed days, UK and US holidays plus Christmas week, and the gate treats them as off for the whole day. It is updated once a year in December, with the date of the last update printed to the log.

The other edge is trades still open when a session switches to off. Off means no new entries on my gate, but an open position gets 15 minutes to reach target or stop before the EA closes it at market.

How does yours handle that moment? Letting a London ticket drift into late NY by default would quietly undo the point of switching that session off.

Re: Session allowlist in code: Asia off, London on

Posted: Thu Oct 29, 2026 3:58 am
by Shadow Trader
Many scalping systems, indicators, and personal rules are tied to specific hours, such as the London open or the New York overlap. The tricky part is that platform server time is not always aligned with real market sessions the same way all year.

Several brokers set server time to follow New York close, which shifts with US daylight saving. London and the US change clocks on different dates, creating a few weeks each spring and autumn where the offset between server time and London open is off by an hour.

During those weeks, an indicator set to trade the first hour of London may be running one hour early or late, and nobody notices until results look odd.

The fix is to anchor any session logic to UTC or to local exchange times and convert on the fly, instead of using raw server hours. Manual traders can draw session boxes that adjust automatically.

Has a clock change ever thrown off your session-based setups, and how did you work out what went wrong?

Re: Session allowlist in code: Asia off, London on

Posted: Sun Nov 01, 2026 6:25 pm
by FXS Prop Desk
The server-time issue is a real trap this week, Fairman. The cleanest fix is to have the EA read the current offset between server time and UTC each day, rather than relying on a fixed rule, and then convert the London window from UTC. In MQL5 that can be done by comparing TimeTradeServer with TimeGMT. It removes the need to remember the two DST weeks in spring and autumn, and works even if the broker changes its server settings.