On this page
Back to tutorials

London Session Breakout EA — No Code

Donchian H1 breakout with Market Session London isActive on Step 4, spread optional, export MQL5, Every tick backtest on EURUSD or GBPUSD.

📖 17 min read

📝 3,300 words

🏷️ MQL5 & Expert Advisors

Share this article:

Try the workflow from this guide

Open the live demo first — no signup. Sign up later to save your strategy and export from Code Generator.


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 1Sell: 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.

FactorWhy it matters for EAs
LiquidityTighter spreads on majors (EURUSD, GBPUSD) vs quiet Asian hours
Range expansionDonchian / band breakouts need movement — London often delivers
False breakoutsStill 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?

LayerRole
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
SignalRule (starter)
BuyDonchian Breakout Up (Threshold 0, Period 5, Confirmation 1) AND London isActive
SellDonchian 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)

ParameterRangeDefaultUse in this EA
Length1 – 1002020 (classic channel lookback)

Market Session (Step 4 — filter parameters)

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
overlapBooleantrueEnable if you use isOverlap condition
preMarketBooleanfalseUsually off for spot forex breakout
afterHoursBooleanfalseUsually off
customStart / customEndTimenullAdvanced: custom London window if needed

Condition Types: Donchian and Market Session

Donchian — Breakout (Step 3, core signal)

FieldOptionsStarter (Buy/Sell)
DirectionUp · DownUp (buy) / Down (sell)
ThresholdNumber (0 = band edge)0
Period1 – 505
Confirmation1 – 101

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)

FieldOptionsStarter
sessionsMultiselect (same list as parameters)London
confirmation1 – 101

Other session conditions (document for power users):

ConditionWhen to use
isOpenEnter only right as session opens
isClosedBlock entries when session ended
isOverlapRequire London + New York overlap (select ≥2 sessions)
timeRemaining / timeElapsedMinutes + operator — exit before session close

Starter vs overlap:

ModeSessions on isActiveBest for
Strict LondonLondon onlyPurist “London breakout” intent
London + NY overlapUse isOverlap with London + NewYorkMaximum liquidity window (often cited in forex education)

Visual Builder vs Hand-Coded Session Filters

ApproachSession + breakoutExport MQL5Notes
AlfaTactix Strategy BuilderStep 3 Donchian + Step 4 Market Session in one UIYes — Code GeneratorThis guide
MetaEditor MQL5 WizardNo native London session templateLimited templatesSee MQL5 Wizard vs Strategy Builder
FxDreema / block toolsPossible with time blocksYesSteeper block graph for beginners — comparison hub
Hand-written MQL5TimeCurrent() + session arraysFull controlHigh bug risk for non-programmers — Why Learning MQL5 Is Hard

Tool intent: You want repeatable rules (breakout + session) → exportStrategy 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)

  1. Tab Buy → timeframe H1.
  2. Add Donchian Channel — Length 20.
  3. Condition BreakoutUp, Threshold 0, Period 5, Confirmation 1.

Step 3 — Sell

  1. Tab SellH1.
  2. Same Donchian Length 20.
  3. BreakoutDown, Threshold 0, Period 5, Confirmation 1.

Step 4 — Filters (mandatory for this guide)

  1. Add filter Market Session.
  2. Parameters: session = London (add NewYork only if you plan overlap mode).
  3. Condition isActivesessions: London, confirmation: 1.
  4. 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

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

Step 6 — Save

Save → Code Generator → download .mq5F7 compile.


Export, Compile, and Backtest

  1. Strategy Tester → symbol EURUSD or GBPUSD.
  2. Period H1 · Model Every tick based on real ticks (or Every tick).
  3. Compare with vs without session filter (disable Step 4 briefly) to see trade count impact — educational exercise only.
  4. Forward test on DemoStrategy 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

IssueFix
Too few tradesAdd isOverlap London+NY · or shorten Donchian Length to 14
Too many false breaksRaise Breakout Confirmation to 2 · add ADX > 25 filter (ADX Trend EA)
Losses outside LondonVerify isActive sessions — timezone GMT vs broker server

Next Steps

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).

Build this EA in Strategy Builder

Start in the live demo — no signup required. Walk through signals, filters, and risk. Create a free account only when you want to save and export MQL5.

Frequently Asked Questions

Yes. In Strategy Builder add Donchian Channel Breakout Up/Down on Step 3, then Step 4 Market Session isActive with sessions London only (or London + New York overlap). Export MQL5 from Code Generator, compile once, backtest H1 EURUSD or GBPUSD with Every tick.

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). Bollinger uses volatility bands. Both work with a London session filter — this guide uses Donchian; see Bollinger Band Breakout EA — No Code for the BB recipe.

The Donchian article teaches channel breakout mechanics without session focus. This article makes London (or London/NY overlap) mandatory on Step 4 — the H1 intent is session + breakout together.

High-impact news can fake breakouts. Optional Step 4 Economic Calendar noEvent pairs well — see News Filter MT5 EA — No Code.

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

Try Strategy Builder — no signup

Try Strategy Builder — No Signup