London Session Breakout EA — No Code

A London session filter plus a Donchian or Bollinger Bands breakout, both built in the Strategy Builder; Donchian MQL5 outline included.

📖 11 min read

📝 2,118 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?

Yes. The session gate is in Strategy Builder Step 4 — Filters: Market sessions → Only trade during the London session (or tick London and New York and choose Only when all are open at the same time for overlap liquidity). The quick filter Only trade during the London session (08:00-17:00 London time, Monday to Friday) adds the same gate in one click. The signal is in Step 3 (Entry rules). Two ways to build it:

  1. Donchian channel breakout — the Donchian channel is one of the 47 indicator types: Close crosses above the upper line for buy, crosses below the lower line for sell. If you prefer to hand-code it, it is 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. Bollinger Bands breakout — 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 Channel and breakout EA · Bollinger Breakout EA · Build EA Without Coding · EA Strategy Library

What you leave with: a session gate in 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 backtest 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 channel or Bollinger Bands: both in the builder
Session gate (Step 4)Trades only when London session is activeIn the builder
Exits and risk (Steps 5 and 6)Stop loss, lot size, optional daily capsIn the builder

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.


Donchian in MQL5, and the 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 is a Step 4 filter — no code needed. In Market sessions, choose Only trade during the London session, and the Strategy Builder ANDs it with whatever Step 3 signal you build (with the default All of these must pass, under How the filters combine).


Market Sessions 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.

In Step 4, the Market sessions section lists one option per session, plus how several sessions combine:

FieldOptionsLondon EA tip
Only trade during the … sessionLondon, New York, Tokyo, SydneyTick London only for strict London-only
When any of them is open / Only when all are open at the same timeChoice when you tick two or more sessionsNeeded only for the London + New York overlap

Each session uses its own city's time zone, so summer time is handled for you and there is no time zone or offset to enter. For hours of your own, add a Time window (Add a time window): it has its own hours, days and Time zone, and the modes Only inside this window and Only outside this window.

ModeWhat you setBest for
Strict LondonLondon onlyPurist "London breakout" intent
London + NY overlapLondon and New York, Only when all are open at the same timeMaximum liquidity window (often cited in forex education)

A No-Code London Breakout With Bollinger Bands

The MT5 form has Bollinger Bands — a volatility band around a moving average — and the Donchian channel if you prefer a rolling high/low channel. Pairing either with the London session filter gives you a fully no-code build. Bollinger version:

SignalRule
BuyClose crosses above the Bollinger upper band AND the London session is open
SellClose crosses below the Bollinger lower band AND the London session is open

Note: 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 walkthrough.


Build the No-Code Version Step by Step

Step 1 — Name and platform

London Bollinger Breakout H1

Step 2 — Timeframes

Add H1 as the Trading timeframe.

Step 3 — Entry rules

In the Buy rule: What to watch Price (Close) · How they compare crosses above · Compare with Bollinger Bands, Line upper. In the Sell rule: crosses below the lower line (Write the sell rule yourself, or leave Sell mirrors Buy on). (For the Donchian version, use the Donchian channel instead: Close crosses above the upper line for Buy, crosses below the lower line for Sell.)

Step 4 — Filters (the London gate)

  1. Open Market sessions.
  2. Tick Only trade during the London session (add Only trade during the New York session only if you plan overlap mode).
  3. With one session ticked, no combination choice is needed. For the overlap, choose Only when all are open at the same time.
  4. The filter is ANDed with the Step 3 signal automatically (All of these must pass).

Optional: a Spread limit on GBPUSD if spread widens at the London open.

Steps 5 and 6 — Exits, risk and money management

SettingSuggestion
Stop loss1.5–2× H1 ATR (unit ATR multiple) or fixed Pips — EA Risk Management
Position sizeFixed lots, 0.01 Demo first

Step 7 — Review and save

Save strategy → Get the code → 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 (remove the Market sessions filter briefly) to see the trade-count impact — educational exercise only.
  4. Forward test on Demo — Backtest an EA in the MT5 Strategy Tester.

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 Spread limit or widen tester spread.
  • Traders often ask for a news filter around London open; the news filter is not available yet (see FAQ).

Improvements: Filters and Risk

IssueFix
Too few tradesTick London and New York with When any of them is open, or shorten the Bollinger Length
Too many false breaksAdd a Spread limit, or a Market conditions line such as Only trade when there is a trend
Losses outside LondonCheck that only Only trade during the London session is ticked; sessions run on London time, not your broker's server time

The London session range breakout: history and rules

Who and when: Common practice, with no known author. One published version was read.

The London breakout has no known author; it is a practice of currency traders. In the hours before London trades, the price of a pair often moves in a narrow range. The trader marks the high and the low of that quiet time and trades the first close outside them once London is active.

The version read marks the range from 00:00 to 07:00 GMT on a 5-minute chart, enters when a 5-minute bar closes outside it, puts the stop just beyond the latest swing and ends the trade at 1.5 times the risk. Other versions may use other hours.

The rule as the source states it

Mark the range from 00:00 to 07:00 GMT on a 5-minute chart. Wait for a 5-minute bar that closes above or below the range and enter at that close, long above and short below. Stop 1 to 2 pips beyond the most recent swing low or high. Target at 1.5 times the risk. [4]

Our version

5-minute bars of a currency pair. The range is the window 00:00 to 07:00 UTC. Buy when a bar closes above its high; sell short when one closes below its low. Target 1.5 times the stop distance.

How ours differs

  • The stop is our default distance, not the latest swing, so "1.5 times the risk" is measured from a different stop.
  • Ours can trade again on the same day when the price crosses the range again; the source describes one trade.
  • The source uses one pair; the file names no symbol.
  • Like every library file, ours also adds the builder's default stop, position size and account limits (Steps 5 and 6). You can change them in the form.

Why this page appears for "scalping": people who search for a scalping robot often mean a short intraday rule like this one. It is a 5-minute rule, not a tick scalper.

Needs the Trader plan or higher. Open in the builder →

Being well known says nothing about how a strategy will do. Test it on your own data.

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), tick Only trade during the London session in Market sessions (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

Yes. Both halves are in the Strategy Builder: the London session gate in Step 4 (Market sessions with Only trade during the London session, or London and New York with Only when all are open at the same time for the overlap) and the breakout signal in Step 3 (a Donchian channel breakout, or a Bollinger Bands breakout). You can also code the Donchian channel yourself 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). Bollinger Bands use volatility bands. Both are in the builder — see Bollinger Band Breakout EA — No Code for the recipe this article pairs with the London session filter.

The Donchian breakout EA, on the Donchian Channel indicator page, covers the Donchian indicator itself. This article's focus is the London session gate on Step 4, which works with any Step 3 signal.

The news filter is not available yet. The closest gates in Step 4 are sessions, time ranges, spread and your own ATR condition.

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

Common practice, with no known author. One published version was read. 5-minute bars of a currency pair. The range is the window 00:00 to 07:00 UTC. Buy when a bar closes above its high; sell short when one closes below its low. Target 1.5 times the stop distance. Being well known says nothing about how a strategy will do. Test it on your own data.

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
  4. DailyForex. What Is the London Breakout Strategy?. https://www.dailyforex.com/forex-articles/london-breakout-strategy/210474