London Session Breakout EA — No Code

The London session filter is real; Donchian is not a builder indicator. Pair the Market Session filter with a Bollinger Bands breakout, or code Donchian in MQL5.

📖 8 min read

📝 1,558 words

🏷️ MQL5 and Expert Advisors

Share this article:

London Session Breakout EA for MT5 — No Code

Can I build a London session breakout EA for MT5 without coding?

Partly. The session gate is real: Strategy Builder Step 4 — Filters has Market Session → condition isActive → sessions London only (or London + New York for overlap liquidity) — that part of this guide works exactly as described. The signal is not: Donchian Channel is not one of the indicators the MT5 Strategy Builder supports, so it cannot sit on Step 3. Two honest paths for the signal:

  1. Code the Donchian channel in MQL5 — the highest high and lowest low of the last N closed bars (outline below), ANDed with a session check, then compile in MetaEditor [1].
  2. Build a no-code breakout with a supported indicator — Bollinger Bands breakout on Step 3, paired with the real London session filter on Step 4. It is a volatility band, not a rolling high/low channel, so signals differ from Donchian.

Disclosure: Educational build guide — not financial advice. Session filters reduce bad hours; they do not guarantee live profits.

Related guides: Donchian Breakout EA — No Code · Bollinger Breakout EA · Build EA Without Coding · EA Strategy Library

What you leave with: a session gate on Step 4 you can see before export, plus a 10-minute chart check to see if Asian-hours breakouts were polluting your backtest.


Why London Session Breakouts Matter

You backtested a breakout rule on H1 for two years. The equity curve looked acceptable. On Demo, half the losses cluster around 02:00–06:00 server time — thin ranges, fake breaks, spread spikes. The signal was not necessarily wrong; the clock was.

Forex volume is not flat 24 hours. The London session (roughly 08:00–17:00 GMT, depending on daylight saving) is where many EUR and GBP pairs see their deepest liquidity and widest ranges. A London-only gate does not invent edge — it stops the EA from trading when your breakout rules were never meant to run.

FactorWhy it matters for EAs
LiquidityTighter spreads on majors (EURUSD, GBPUSD) vs quiet Asian hours
Range expansionBreakout signals need movement — London often delivers
False breakoutsStill happen — session filter reduces Asian chop entries, does not eliminate risk

Official context: MetaTrader runs EAs on OnTick() [2]; your job in a visual builder is to define when entries are allowed — including session gates before a breakout signal fires.


What Is a London Session Breakout EA?

LayerRoleStatus in AlfaTactix
Signal (Step 3)Price breaks above/below a channel or bandDonchian: not supported. Bollinger Bands: supported
Session gate (Step 4)Trades only when London session is activeSupported today
Risk (Step 5)Stop loss, lot size, optional daily capsSupported today

Channel theory: Donchian Channel Academy guide. Turtle-style breakout ideas are public knowledge — this guide explains the concept and gives you a reproducible no-code build with the indicators AlfaTactix actually supports.


Donchian in MQL5, and the Market Session Filter in Strategy Builder

There is no built-in Donchian function in MQL5. A hand-written EA reads the highest high and lowest low of the last N closed bars:

// OnTick, once per new bar
int hh = iHighest(_Symbol, PERIOD_H1, MODE_HIGH, 20, 1);
int ll = iLowest(_Symbol, PERIOD_H1, MODE_LOW, 20, 1);
double upper = iHigh(_Symbol, PERIOD_H1, hh);
double lower = iLow(_Symbol, PERIOD_H1, ll);
bool buyBreak  = close[0] > upper;
bool sellBreak = close[0] < lower;
bool londonNow = /* your own session-time check, e.g. TimeCurrent() hour range */;
bool takeBuy   = buyBreak && londonNow;

The session half of that AND, by contrast, is a real Step 4 filter — no code needed. Add Market Session, condition isActive, sessions London, and the Strategy Builder ANDs it with whatever Step 3 signal you build.


Market Session Parameters in Strategy Builder

A 24-hour axis with one highlighted window in which the rules are allowed to act.rules activeidle0004081216202408:00 – 17:00
A session filter is a window on the clock: outside it, the rules stay idle.

From marketSessionConfig in the product:

ParameterType / optionsDefaultLondon EA tip
sessionMultiselect: London, NewYork, Tokyo, Sydney, Frankfurt, Paris, Zurich, HongKong, SingaporeLondon, NewYorkSet London only for strict London-only
timezoneUTC, EST, PST, GMT, JST, AESTUTCMatch your broker server or use GMT consistently
offset-12 – 120Adjust if broker server time differs from GMT

Condition types on Market Session:

ConditionWhen to use
isActiveTrade only while the selected session(s) are open — the core gate for this guide
isOpenEnter only right as session opens
isClosedBlock entries when session ended
isOverlapRequire London + New York overlap (select ≥2 sessions)
ModeSessions on isActiveBest for
Strict LondonLondon onlyPurist "London breakout" intent
London + NY overlapisOverlap with London + NewYorkMaximum liquidity window (often cited in forex education)

A No-Code London Breakout With Bollinger Bands

The MT5 form supports the market's most-used indicators, including Bollinger Bands — a volatility band around a moving average. Pairing it with the real London session filter gives you a fully no-code, fully exportable build:

SignalRule
BuyClose crosses above the Bollinger upper band AND London isActive
SellClose crosses below the Bollinger lower band AND London isActive

Honest limit: Bollinger Bands react to volatility around a moving average, not a rolling N-bar high/low the way Donchian does. Expect a different (usually more frequent) signal set — see Bollinger Band Breakout EA — No Code for the full condition reference.


Build the No-Code Version Step by Step

Step 1 — Name

London Bollinger Breakout H1

Step 2 — Timeframes

Enable H1.

Step 3 — Signals

Add Bollinger Bands on the Buy tab: condition Price Cross → band Upper, Source Close. Mirror for Sell with band Lower.

Step 4 — Filters (the London gate)

  1. Add filter Market Session.
  2. Parameters: session = London (add NewYork only if you plan overlap mode).
  3. Condition isActive → sessions London.
  4. The filter is ANDed with the Step 3 signal automatically.

Optional: a liquidity filter (spread) on GBPUSD if spread widens at the London open.

Step 5 — Risk

SettingSuggestion
Stop Loss1.5–2× H1 ATR or fixed pips — EA Risk Management
Lot0.01 Demo first

Step 6 — Save

Save → Code Generator → download .mq5 → F7 compile.


Export, Compile, and Backtest

  1. Strategy Tester [3] → symbol EURUSD or GBPUSD.
  2. Period H1 · Model Every tick.
  3. Compare with vs without the session filter (disable Step 4 briefly) to see the trade-count impact — educational exercise only.
  4. Forward test on Demo — Strategy Tester vs Live.

Trader-Reported Themes (Forums)

In public threads on r/Forex and r/algotrading, traders often report (themes, not profit claims):

  • Breakout EAs that run 24/7 pick up Asian false breaks — session filters are a common fix.
  • GBP pairs can spike spread at London open — add a liquidity filter or widen tester spread.
  • Traders often ask for a news filter around London open; AlfaTactix does not have one today (see FAQ).

Improvements: Filters and Risk

IssueFix
Too few tradesAdd isOverlap London+NY, or shorten the Bollinger period
Too many false breaksRequire the Price Cross to hold for one extra bar; add a liquidity (spread) filter
Losses outside LondonVerify isActive sessions — timezone GMT vs broker server


Tactix AI on this workflow

AlfaTactix includes Tactix AI: use Tactix Studio to describe your idea in plain language and draft timeframes, signals, filters, and risk into the same six-step Strategy Builder form — or open Tactix Guide on any step when you only need a field explained. Review every value, then export MQL5 or Pine Script from Code Generator (form-first — not untested prompt-to-code).

Next Steps

10-minute chart check (before you trust any London EA): On H1 EURUSD or GBPUSD, mark your last 20 breakout signals. Count how many fired outside 08:00–17:00 GMT. If more than a third are Asian, your 24/7 backtest is lying to you. Open the live Strategy Builder demo (no signup), add Market Session isActive → London on Step 4 over a Bollinger Bands signal, and rerun the same tester dates. If drawdown on losing hours drops, you have earned the rest of this guide.

References: MetaTrader 5 Strategy Tester [3] · Donchian Channel (academy).

Frequently Asked Questions

Partly. The London session gate is real: Step 4 Market Session with isActive and sessions set to London (or London + New York for the overlap) works today. The Donchian Channel breakout signal is not — it is not among the Strategy Builder's supported indicators. The no-code path pairs the same London session filter with a Bollinger Bands breakout on Step 3 instead; for a true Donchian channel you need to code it in MQL5.

London is one of the most liquid forex sessions (often overlapping with European opens). Breakout systems need volume and range expansion — trading only when the London session is active avoids thin Asian ranges. This is educational logic, not a profit guarantee.

Donchian uses highest high / lowest low channels (Turtle-style) and is not a supported indicator today. Bollinger Bands use volatility bands and are supported — see Bollinger Band Breakout EA — No Code for the no-code recipe this article pairs with the London session filter.

That article covers the Donchian indicator itself (also not supported, same manual-MQL5 and Bollinger-alternative paths). This article's focus is the London session gate on Step 4, which is real and works with any supported Step 3 signal.

Not in AlfaTactix today — there is no economic calendar or news filter in the Strategy Builder. The closest real gates are Step 4 market session, time range, ATR volatility and liquidity (spread).

No. Educational template only. Backtest, then Demo, then live with risk you can afford.

References

  1. MetaQuotes, MetaEditor Help. Welcome to algorithmic trading!. https://www.metatrader5.com/en/metaeditor/help
  2. MetaQuotes, MQL5 Reference. OnTick. https://www.mql5.com/en/docs/event_handlers/ontick
  3. MetaQuotes. MetaTrader 5 Built-in Trading Strategy Tester. https://www.metatrader5.com/en/automated-trading/strategy-tester

AlfaTactix is a no-code strategy builder for MetaTrader 5 (MQL5) and TradingView (Pine Script) traders who design and manage rule-based strategies.

Trading involves substantial risk of loss. AlfaTactix generates code from the rules you define and does not provide financial advice. Past or backtested performance does not guarantee future results.

© 2026 AlfaTactix. All rights reserved.