Skip to content

Free MT5 indicator

Bollinger Squeeze Breakout

Bollinger Bands for MT5 that highlight bandwidth squeezes and mark closed-bar breakouts that follow them, with optional alerts.

Breakoutv1.0MetaTrader 5 (MQL5) Compiles with 0 errors Non-repainting signals Alerts

What it does

This indicator draws standard Bollinger Bands and watches how wide they are. When the bands contract to one of their narrowest readings of the recent past, the middle band turns orange to show a squeeze. If a bar then closes outside the bands within a few bars of that squeeze, an arrow marks the breakout.

The idea is simple: quiet periods with low volatility are often followed by bigger moves, and the first close outside a tight band can be an early sign of that expansion. If you are new to the bands themselves, start with the Bollinger Bands lesson.

How it works

  • Middle band = simple moving average of the close over the bands period.
  • Upper and lower bands = middle band plus or minus the chosen number of population standard deviations of the close over the same period.
  • Bandwidth = (upper band - lower band) / middle band x 100.
  • A bar is in a squeeze when its bandwidth is no more than the lowest bandwidth of the lookback window multiplied by (1 + tolerance / 100).
  • An up arrow appears when a closed bar's close moves above the upper band (the previous close was at or below it) and the last squeeze bar was no more than the breakout window before it. A down arrow uses the lower band the same way.

Arrows are only evaluated on closed bars, so they do not appear and disappear while a bar is still forming. The bands on the live bar update with price, as any moving average does.

How to use it

Treat the orange middle band as a "get ready" signal, not a trade. The arrow tells you price has closed outside a compressed range. Many traders then look for confirmation such as a retest of the band, a break of a nearby support or resistance level, or agreement with the higher-timeframe trend.

The tool works on any symbol and timeframe. H1 and H4 tend to give cleaner squeezes on major forex pairs and gold; lower timeframes produce more frequent but noisier signals. Use a stop-loss beyond the opposite side of the squeeze range and size the position with the Position Size Calculator.

Settings

InputDefaultWhat it changes
Bands period20Length of the moving average and standard deviation
Standard deviations2.0Width of the bands
Bandwidth lookback (bars)120How far back the lowest bandwidth is measured
Squeeze tolerance (%)10.0Higher values mark more bars as squeezes
Breakout window10Bars after a squeeze in which a breakout still counts
Popup alert / Push notificationfalseAlerts once per bar when a new arrow prints

Limitations

  • A close outside the bands can be a false breakout that quickly reverses back inside, especially around news releases.
  • Squeezes can last a long time; the indicator does not predict direction or timing.
  • The lookback needs enough history; the first lookback bars on the chart never show a squeeze.
  • Results vary with the spread and session; thin markets can produce misleading closes.

Key inputs

Key inputs of Bollinger Squeeze Breakout
InputDefaultDescription
Bands period20Bars used for the moving average and standard deviation.
Standard deviations2.0Distance of the upper and lower bands from the middle band.
Bandwidth lookback (bars)120Window used to find the lowest recent bandwidth.
Squeeze if bandwidth within this % of the lowest10.0Tolerance above the lowest bandwidth that still counts as a squeeze.
Bars after a squeeze in which a breakout counts10How long after the last squeeze bar a breakout arrow can appear.
Popup alert on a new breakoutfalseShows an MT5 alert once per bar when a new arrow appears.

Educational tools, not advice. Indicators and Expert Advisors describe price; they do not predict it, and past behaviour does not guarantee future results. Test everything on a demo account first and never risk money you cannot afford to lose. See our disclaimer.

Keep exploring

Related mt5 indicators