- Strategy
- Buys the first close above the upper Bollinger Band and sells the first close below the lower band, but only when bandwidth was near its lowest level of recent history just before the breakout.
- Risk model
- 1% of balance per trade (configurable), ATR-based stop-loss on every order, one position at a time
What it does
Quiet markets tend to be followed by active ones. Bollinger Squeeze Breakout EA measures how narrow the Bollinger Bands are compared with their own recent history, and when they have been unusually tight, it trades the first decisive close outside the bands.
How it works
Bandwidth is (upper band − lower band) ÷ middle band, using a 20-period, 2-deviation Bollinger Band. On each new bar:
- The EA finds the lowest bandwidth of the last 120 closed bars (excluding the breakout bar).
- A squeeze exists if any of the 5 bars before the breakout bar had a bandwidth no more than 1.10 × that lowest value.
- Buy: the last closed bar closed above the upper band and the bar before it did not.
- Sell: the last closed bar closed below the lower band and the bar before it did not.
- Stop-loss: 2 × ATR(14) from the entry price. Take-profit: 2 × the stop distance (set to 0 to rely on the exits only).
With the middle-band exit enabled, an open buy is closed when a bar closes below the middle band, and an open sell when a bar closes above it. This cuts breakouts that fail quickly. The page on volatility covers why calm periods often precede larger moves.
How to use it
Squeezes are rare by design, so expect long quiet periods. The EA suits instruments that trend after consolidation, such as major pairs around session opens, gold, and stock indices. H1 is a balanced starting point. The trailing stop can be switched on if you prefer to let trends run instead of using a fixed target.
Settings
| Input | Default | What it changes |
|---|---|---|
| Bollinger period / deviation | 20 / 2.0 | Band shape |
| Bars used to find the lowest bandwidth | 120 | Squeeze reference window |
| Squeeze recent bars | 5 | How fresh the squeeze must be |
| Squeeze factor | 1.10 | Tolerance above the lowest bandwidth |
| Stop-loss (x ATR) | 2.0 | Stop size |
| Reward:risk target | 2.0 | Take-profit, 0 disables it |
| Middle-band exit | true | Early exit for failed breakouts |
| Risk per trade / Fixed lots | 1.0% / 0 | Position sizing |
| Max spread / Trading hours | 30 / 7–20 | Filters |
| Break-even / Trailing | on / off | Stop management |
Limitations
The direction of a squeeze breakout is unknown in advance, and false breaks are common: price may close outside the band once and then reverse. Squeezes before major news can resolve with a gap that jumps the stop. A fixed 120-bar reference means the definition of "narrow" depends on the timeframe.
Before you run it live
Run the Strategy Tester across different market phases (trending and ranging years), then a demo account. Check spreads around session opens, where breakouts often happen, and set the risk per trade to a level you can sustain through a run of losses. Past behavior does not guarantee future results.

