London Session Breakout EA for MT5 — No Code
Can I build a London session breakout EA for MT5 without coding?
Yes. In AlfaTactix Strategy Builder, Step 3 — Signals on H1: add Donchian Channel (Length 20) → Buy: condition Breakout → Direction Up, Threshold 0, Period 5, Confirmation 1 → Sell: Breakout → Direction Down, same fields. Step 4 — Filters: add Market Session → condition isActive → Sessions London only (starter) or London + New York for overlap liquidity. Step 5 stop loss / lot → Save → export MQL5 from Code Generator → compile in MetaEditor → backtest H1 EURUSD or GBPUSD with Every tick in the Strategy Tester.
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 · Advanced MTF & Filters · News Filter 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 breakouts were polluting your Donchian backtest.
Why London Session Breakouts Matter
You backtested Donchian 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 indicator was not 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.
| Factor | Why it matters for EAs |
|---|---|
| Liquidity | Tighter spreads on majors (EURUSD, GBPUSD) vs quiet Asian hours |
| Range expansion | Donchian / band breakouts need movement — London often delivers |
| False breakouts | Still happen — session filter reduces Asian chop entries, not eliminate risk |
Official context: MetaTrader runs EAs on OnTick(); your job in a visual builder is to define when entries are allowed — including session gates before breakout logic fires.
This guide vs generic Donchian article: Donchian Breakout EA — No Code documents the indicator. Here, London (or London/NY) on Step 4 is the differentiator for traders searching london breakout ea or london session forex robot.
What Is a London Session Breakout EA?
| Layer | Role |
|---|---|
| Signal (Step 3) | Price breaks above Donchian upper band (buy) or below lower band (sell) |
| Session gate (Step 4) | Trades only when London session is active |
| Risk (Step 5) | Stop loss, lot size, optional daily caps |
| Signal | Rule (starter) |
|---|---|
| Buy | Donchian Breakout Up (Threshold 0, Period 5, Confirmation 1) AND London isActive |
| Sell | Donchian Breakout Down AND London isActive |
Channel theory: Donchian Channel Academy guide. Turtle-style breakout ideas are public knowledge — we teach one reproducible template in Strategy Builder, not a “secret” influencer system.
Donchian and Session Parameters in Strategy Builder
Donchian Channel (Step 3 — indicator parameters)
| Parameter | Range | Default | Use in this EA |
|---|---|---|---|
| Length | 1 – 100 | 20 | 20 (classic channel lookback) |
Market Session (Step 4 — filter parameters)
From marketSessionConfig in the product:
| Parameter | Type / options | Default | London EA tip |
|---|---|---|---|
| session | Multiselect: London, NewYork, Tokyo, Sydney, Frankfurt, Paris, Zurich, HongKong, Singapore | London, NewYork | Set London only for strict London-only |
| timezone | UTC, EST, PST, GMT, JST, AEST | UTC | Match your broker server or use GMT consistently |
| offset | -12 – 12 | 0 | Adjust if broker server time differs from GMT |
| overlap | Boolean | true | Enable if you use isOverlap condition |
| preMarket | Boolean | false | Usually off for spot forex breakout |
| afterHours | Boolean | false | Usually off |
| customStart / customEnd | Time | null | Advanced: custom London window if needed |
Condition Types: Donchian and Market Session
Donchian — Breakout (Step 3, core signal)
| Field | Options | Starter (Buy/Sell) |
|---|---|---|
| Direction | Up · Down | Up (buy) / Down (sell) |
| Threshold | Number (0 = band edge) | 0 |
| Period | 1 – 50 | 5 |
| Confirmation | 1 – 10 | 1 |
Alternative: Price Cross → Band Upper / Lower, Source Close — simpler, more signals. See Donchian Breakout EA.
Other Donchian conditions in UI: Pullback — advanced; backtest before live.
Market Session — isActive (Step 4, core filter)
| Field | Options | Starter |
|---|---|---|
| sessions | Multiselect (same list as parameters) | London |
| confirmation | 1 – 10 | 1 |
Other session conditions (document for power users):
| Condition | When to use |
|---|---|
| isOpen | Enter only right as session opens |
| isClosed | Block entries when session ended |
| isOverlap | Require London + New York overlap (select ≥2 sessions) |
| timeRemaining / timeElapsed | Minutes + operator — exit before session close |
Starter vs overlap:
| Mode | Sessions on isActive | Best for |
|---|---|---|
| Strict London | London only | Purist “London breakout” intent |
| London + NY overlap | Use isOverlap with London + NewYork | Maximum liquidity window (often cited in forex education) |
Visual Builder vs Hand-Coded Session Filters
| Approach | Session + breakout | Export MQL5 | Notes |
|---|---|---|---|
| AlfaTactix Strategy Builder | Step 3 Donchian + Step 4 Market Session in one UI | Yes — Code Generator | This guide |
| MetaEditor MQL5 Wizard | No native London session template | Limited templates | See MQL5 Wizard vs Strategy Builder |
| FxDreema / block tools | Possible with time blocks | Yes | Steeper block graph for beginners — comparison hub |
| Hand-written MQL5 | TimeCurrent() + session arrays | Full control | High bug risk for non-programmers — Why Learning MQL5 Is Hard |
Tool intent: You want repeatable rules (breakout + session) → export → Strategy Tester — not a semester of MQL5 time functions.
Build the London Breakout EA Step by Step
Step 1 — Name
London Donchian Breakout H1
Step 2 — Timeframes
Enable H1 (match Donchian calculation TF to H1 on Step 3 tabs).
Step 3 — Signals (Buy)
- Tab Buy → timeframe H1.
- Add Donchian Channel — Length 20.
- Condition Breakout → Up, Threshold 0, Period 5, Confirmation 1.
Step 3 — Sell
- Tab Sell → H1.
- Same Donchian Length 20.
- Breakout → Down, Threshold 0, Period 5, Confirmation 1.
Step 4 — Filters (mandatory for this guide)
- Add filter Market Session.
- Parameters: session = London (add NewYork only if you plan overlap mode).
- Condition isActive → sessions: London, confirmation: 1.
- Logical combination: Session filter AND with Step 3 signals (default filter behavior on Step 4).
Optional: Liquidity → hasSpread maxSpread 0.015 on GBPUSD if spread widens at open.
Optional: News filter noEvent on high-impact days.
Step 5 — Risk
| Setting | Suggestion |
|---|---|
| Stop Loss | 1.5–2× H1 ATR or fixed pips — EA Risk Management |
| Take Profit | Optional channel width target |
| Lot | 0.01 Demo first |
Step 6 — Save
Save → Code Generator → download .mq5 → F7 compile.
Export, Compile, and Backtest
- Strategy Tester → symbol EURUSD or GBPUSD.
- Period H1 · Model Every tick based on real ticks (or Every tick).
- Compare with vs without session filter (disable Step 4 briefly) to see trade count impact — educational exercise only.
- Forward test on Demo — Strategy Tester vs Live.
Production-Ready MQL5 Without MetaEditor.
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 hasSpread or widen tester spread.
- News at 08:30 UK / US can invalidate pure breakout entries — calendar filter helps.
Improvements: Filters and Risk
| Issue | Fix |
|---|---|
| Too few trades | Add isOverlap London+NY · or shorten Donchian Length to 14 |
| Too many false breaks | Raise Breakout Confirmation to 2 · add ADX > 25 filter (ADX Trend EA) |
| Losses outside London | Verify isActive sessions — timezone GMT vs broker server |
Next Steps
- Donchian Breakout EA — No Code — full Donchian condition reference
- EURUSD Scalping EA — No Code — M5 EURUSD with spread filter
- Build EA Without Coding
- ADX Trend Filter — optional chop filter on top of session
10-minute chart check (before you trust any London EA): On H1 EURUSD or GBPUSD, mark your last 20 Donchian 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, and rebuild only that filter on your existing Donchian idea — rerun the same tester dates. If drawdown on losing hours drops, you have earned the rest of this guide.
References: MetaTrader 5 Strategy Tester · Donchian Channel (academy).