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:
- 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].
- 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.
| Factor | Why it matters for EAs |
|---|---|
| Liquidity | Tighter spreads on majors (EURUSD, GBPUSD) vs quiet Asian hours |
| Range expansion | Breakout signals need movement — London often delivers |
| False breakouts | Still 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?
| Layer | Role | Status in AlfaTactix |
|---|---|---|
| Signal (Step 3) | Price breaks above/below a channel or band | Donchian channel or Bollinger Bands: both in the builder |
| Session gate (Step 4) | Trades only when London session is active | In the builder |
| Exits and risk (Steps 5 and 6) | Stop loss, lot size, optional daily caps | In 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
In Step 4, the Market sessions section lists one option per session, plus how several sessions combine:
| Field | Options | London EA tip |
|---|---|---|
| Only trade during the … session | London, New York, Tokyo, Sydney | Tick London only for strict London-only |
| When any of them is open / Only when all are open at the same time | Choice when you tick two or more sessions | Needed 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.
| Mode | What you set | Best for |
|---|---|---|
| Strict London | London only | Purist "London breakout" intent |
| London + NY overlap | London and New York, Only when all are open at the same time | Maximum 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:
| Signal | Rule |
|---|---|
| Buy | Close crosses above the Bollinger upper band AND the London session is open |
| Sell | Close 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)
- Open Market sessions.
- Tick Only trade during the London session (add Only trade during the New York session only if you plan overlap mode).
- With one session ticked, no combination choice is needed. For the overlap, choose Only when all are open at the same time.
- 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
| Setting | Suggestion |
|---|---|
| Stop loss | 1.5–2× H1 ATR (unit ATR multiple) or fixed Pips — EA Risk Management |
| Position size | Fixed lots, 0.01 Demo first |
Step 7 — Review and save
Save strategy → Get the code → download .mq5 → F7 compile.
Export, Compile, and Backtest
- Strategy Tester [3] → symbol EURUSD or GBPUSD.
- Period H1 · Model Every tick.
- Compare with vs without the session filter (remove the Market sessions filter briefly) to see the trade-count impact — educational exercise only.
- 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
| Issue | Fix |
|---|---|
| Too few trades | Tick London and New York with When any of them is open, or shorten the Bollinger Length |
| Too many false breaks | Add a Spread limit, or a Market conditions line such as Only trade when there is a trend |
| Losses outside London | Check 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
- Donchian Channel and breakout EA — the Donchian indicator itself, with the builder and manual MQL5 paths
- Bollinger Band Breakout EA — No Code — full condition reference for the signal used here
- EURUSD Scalping EA — No Code — M5 EURUSD with a liquidity filter
- Build EA Without Coding
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).

