The bollinger band breakout indicator takes the opposite view to most band tools. It does not fade the edge. It marks the bar that closes outside the band, having closed inside on the bar before. That is a breakout reading of the same three lines.
This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from GBPUSD M15.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Main price chart |
| Plots | 5: Mid, Upper, Lower, Buy, Sell |
| Alerts | popup, push notification, email, sound |
| Inputs | 9 |
What the Bollinger Band Breakout Indicator draws on the chart
Mid is the goldenrod line, a simple average over `BbPeriod` bars.
Upper and Lower are the dodger blue lines at `BbMult` deviations either side.
Buy places a lime arrow under a bar closing above Upper.
Sell places a red arrow above a bar closing below Lower.
- Mid: line, goldenrod, width 2
- Upper: line, dodger blue, width 2
- Lower: line, dodger blue, width 2
- Buy: arrow, lime, width 3, arrow code 233
- Sell: arrow, red, width 3, arrow code 234

How the Bollinger Band Breakout Indicator calculates its values
Building the three lines
iMA supplies a simple average of the close over `BbPeriod` `20` bars. iStdDev supplies the standard deviation over the same window. Up takes the average plus `BbMult` `2.0` times that figure and Lo subtracts it. Nothing here departs from the original recipe.
Testing for a break
A buy needs the close above Up now and at or below Up on the previous bar. The sell case mirrors that against Lo. Comparing the previous close against the previous band value matters. Bands move every bar, so testing both against today would misread the crossing.
Why closes and not wicks
The test reads close only. A wick beyond the band leaves no mark at all. That choice cuts the signal count sharply and removes the spikes that poke out and come straight back inside.
How to read the signals
A mark means price closed further from the average than it usually does.
Bands squeezing together before a break is the classic setup this rule catches.
In a strong trend price can close outside for several bars running.
Raise `BbMult` when too many ordinary bars qualify.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
`EnableAlerts` ships on and `EnablePopup` carries the message. `EnablePushNotify`, `EnableEmail` and `EnableSound` stay off by default. `SoundFile` names the clip. The guard allows one break message per closed bar.
Every Bollinger Band Breakout Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
BbPeriod |
Bars in the average and the deviation, default `20`. | 20 |
BbMult |
Band width in standard deviations, default `2.0`. Raise it to 2.5 for rarer breaks. | 2.0 |
Display settings
| Setting | What it does | Default |
|---|---|---|
ArrowOffsetPts |
Break arrow distance from the bar in points, default `30`. | 30 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
Switches the break alerts on as a group, default `true`. | on |
EnablePopup |
Raises the terminal dialog on a break, default `true`. | on |
EnablePushNotify |
Sends the break to your phone, default `false`. | off |
EnableEmail |
Mails the break through the terminal, default `false`. | off |
EnableSound |
Plays a file when a break prints, default `false`. | off |
SoundFile |
Name of the wav file the break alert uses, default `alert.wav`. | alert.wav |

Settings that fit your chart
GBPUSD M15 is the reference chart, and it produces clean channel breaks around the London hours. On M5 the bands are narrow and a break can be a handful of pips. On H1 and H4 a close outside a 20-bar band is a genuine event, which suits a slower approach.
When the Bollinger Band Breakout Indicator fails
Bands widen after a break, so the second bar often closes back inside.
A squeeze can break either way. The rule tells you which way it went, never which way it will go.
Standard deviation assumes the spread of closes behaves normally. Around news it does not.
Copy the compiled Bollinger Band Breakout Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.
Download the Bollinger Band Breakout Indicator for MT4 and MT5
The zip holds the compiled Bollinger Band Breakout Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.
Download this indicator free
Enter your email and the file is yours. You also get the full MT4 and MT5 library.
FAQ
What does BbMult at 2.0 put the bands at?
Two standard deviations of the close either side of the 20-bar average. On a normal spread that covers most of the recent range. Raise it to 2.5 and a break becomes rarer and more meaningful. Lower it and ordinary bars start qualifying.
Why compare against the previous Upper value?
Because the band moves every bar. Testing the previous close against today’s Upper would mix two different reference levels. The code reads Up at index i plus one for the earlier bar, so the crossing is measured against the band as it stood then.
Does a wick through Upper count?
No. The test reads close only. A bar that spikes past the band and closes back inside leaves nothing on the chart. That single choice removes most of the false marks a high-and-low test would produce.
Does BbPeriod at 20 suit GBPUSD M15?
It is the reference setting on the reference chart. Twenty M15 bars covers five hours, which spans the London open nicely. On a slower pair you may want a longer window so the bands stop reacting to every small push.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Bollinger Band Breakout Indicator as one input. Always backtest before trading live.
Category: this is part of our Volatility collection. Also, truly, browse more Volatility for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- For background on this concept, see Trading band on Wikipedia.
- For broader market context, see Bollinger Bands at StockCharts ChartSchool.
