MetaTrader 5 · XAUUSD · Breakout EAs

Bollinger Squeeze Breakout EA for MT5

GoldLab Bollinger Squeeze is a Bollinger squeeze EA for MetaTrader 5. It waits until volatility contracts - Bollinger Bands inside the Keltner Channel or a narrow band width - and then trades the expansion breakout in the direction of the EMA trend.

GoldLab Bollinger Squeeze - bollinger squeeze ea
GoldLab Bollinger Squeeze logo
$99One-time purchase · no subscription · free demo on MQL5
Buy on MQL5 Market →

GoldLab Bollinger Squeeze is a fully automated Expert Advisor for MetaTrader 5. It is designed for XAUUSD (gold) and also runs on other symbols such as EURUSD.

How it trades

  1. Squeeze detection - volatility is considered compressed when the Bollinger Band width is near its lowest of the last N bars, and/or when the Bollinger Bands sit inside a Keltner Channel (EMA +/- ATR). You choose which definition to use.
  2. Expansion breakout - within a few bars after a squeeze, a candle must close outside the Bollinger Band (a fresh close, not a bar that was already outside).
  3. Trend filter - longs only above a rising trend EMA (default 100), shorts only below a falling one. Can be switched off.
  4. Stop-loss at the Bollinger middle band (with a minimum ATR distance). Optional take-profit at an R-multiple (default 3R; set 0 to exit only by trailing).
  5. Trailing - on every new bar the stop is moved to the middle band (plus a small ATR buffer) when that tightens it, so trades are held while the expansion continues and closed when price falls back through the middle of the bands.

Risk management (built in)

  • Every trade is opened with a stop-loss. There is no martingale, no grid and no averaging down.
  • Position size from risk % of balance (default 1%) or a fixed lot; lots are normalised to the broker's min / max / step and reduced if free margin is not enough.
  • Daily loss limit: no new trades for the rest of the day once equity is down the set % from the day-start balance.
  • Max spread filter, optional trading-hours filter, and no orders while the market is closed or trading on the symbol is disabled.
  • Stop-loss / take-profit are always placed outside the broker's stops and freeze levels.
  • Works on hedging and netting accounts (on netting accounts it opens only when the symbol has no position).

Inputs and default settings

InputDefaultDescription
Signal timeframeCurrentTimeframe for all calculations
Bollinger period / deviation20 / 2.0Bollinger Bands settings
Squeeze definitionEitherNarrowest width, inside Keltner, or either
Width look back / tolerance60 / 0.10Width within 10% of the lowest of the last 60 bars
Keltner multiplier1.5Keltner = EMA +/- ATR x this
Squeeze memory (bars)6Breakout must come within this many bars of a squeeze
Use trend filter / Trend EMAtrue / 100Trade only with the EMA trend
ATR period20ATR for Keltner and stops
Minimum stop (x ATR)1.0Minimum stop distance
Take-profit (R)3.00 = no fixed target, exit by trailing stop
Trail on middle band / buffertrue / 0.1Middle-band trailing stop
Risk per trade (%)1.0Risk as % of balance, used when Fixed lot = 0
Fixed lot0.0Fixed lot size (0 = use Risk %)
Maximum lot10.0Upper cap per trade
Use minimum lot if risk lot is too smalltrueOn small accounts trade the broker minimum instead of skipping
Magic number20271004Change it to run several copies on one account
Daily loss limit (%)3.0Stop opening trades for the day at this loss (0 = off)
Max spread (points)602-digit gold / 4-digit FX scale (100 = 1.00 USD on gold); 0 = off
Restrict to trading hoursfalseOptional start / end hour (server time) for new entries
Max slippage (points)30Same scale as spread
Show info panelfalseOptional status panel on the chart

Recommended setup

  • Symbol / timeframe: XAUUSD H1 (designed for gold); also FX majors such as EURUSD. Any timeframe from M15 to H4.
  • Account: any (hedging or netting), any deposit that allows the broker's minimum lot with a sensible risk %.
  • VPS: recommended for uninterrupted operation.

Honest notes

  • No trading system can guarantee profit. Past performance, in the tester or live, does not guarantee future results.
  • Always test the EA in the MetaTrader 5 Strategy Tester and then on a demo account before using real money, with your broker's own data and spread.
  • Session hours are in your broker's server time - check your broker's time zone and adjust the hour inputs if needed.
  • Start with a low risk % and use money you can afford to lose.
How GoldLab Bollinger Squeeze trades - illustration
How it trades (illustration, not real trading results).
GoldLab Bollinger Squeeze risk management features
Built-in risk management.

Plan your risk before you run it

FAQ

What is a Bollinger squeeze?

A squeeze is a period of unusually low volatility, when the Bollinger Bands narrow or move inside the Keltner Channel. Quiet periods are often followed by larger moves, and the EA trades the breakout once the bands expand again.

Is there a free demo?

Yes. Every MQL5 Market product has a free demo that runs in the MetaTrader 5 Strategy Tester, so you can test it on your broker's own data before buying.

Does it use martingale, grid or averaging down?

No. Every position is opened with a stop-loss, the lot size comes from your risk % (or a fixed lot), and there is a daily loss limit.

Which broker and account do I need?

Any MetaTrader 5 broker that offers XAUUSD, on a hedging or netting account. A low-spread account and a VPS for 24/5 operation are recommended.

Can this EA guarantee profits?

No. No trading system wins every trade, and backtest or past results do not guarantee future results. Start on a demo account with the default risk.

Trading gold, forex and CFDs is high risk and you can lose your capital. This page is for information only and is not investment advice. Illustrations are not trading results.