The Bollinger bands alert indicator draws a standard band set on the working chart. It marks the bar that closes back inside after a stretch outside. Five buffers ship in one file: the mid line, both rails and two markers. It suits traders who fade extremes rather than chase them.
This build ships as bollinger-bands-alert-indicator-forexmt4systems.ex4 for MT4 and bollinger-bands-alert-indicator-forexmt4systems.ex5 for MT5; the screenshots below come from EURUSD H1.
| 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 bands alert Indicator draws on the chart
Mid runs along the simple moving average. Upper and Lower run a fixed number of standard deviations either side. Goldenrod marks the average and dodger blue marks both rails.
Buy places a lime up arrow under the bar that closed back inside from below. Sell places a red down arrow above the bar that closed back inside from above. ArrowOffsetPts holds each marker clear of the wick.
All five plots sit on the price chart itself. Nothing opens a second pane. The bands overlay the candles they measure.
- 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 bands alert Indicator calculates its values
Building the band set
Two platform calls do the maths. A simple moving average over BbPeriod closes gives the mid line. A standard deviation over the same window gives the spread. Upper adds BbMult deviations to the average and Lower subtracts the same amount.
The re-entry test
Arrows need two bars. Buy fires when the previous bar closed under Lower and the current bar closes at or above it. Sell fires on the mirror case at Upper.
That ordering makes this a mean reversion marker. The stretch outside the rail has to finish before anything prints. It triggers later than a break marker but reads cleaner on ranging charts.
Warm-up and redraw
The first bars stay blank. Drawing begins a couple of bars past the BbPeriod window. Both the average and the deviation then have a full sample behind them. Older arrows never move, because both closes they depend on have finished.
How to read the signals
An arrow says the stretch has ended, not that a reversal has started. The most common plan takes the mid line as the first target. Price returning inside a band often works back toward its average.
Rail width tells you what kind of market you have. Wide rails follow a volatile stretch, and their re-entries can run far. Narrow rails follow quiet trade, and the moves back stay small.
Trends produce one-sided arrows. A long run of Sell markers with no Buy markers means price walks the upper rail. Fading each one there works poorly.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
An arrow on the last completed bar can trigger a popup, a push notification, an email or a sound. The guard limits the build to one message per closed bar.
Every Bollinger bands alert Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
BbPeriod |
Bars in the moving average and the deviation window. A shorter span tightens both rails. | 20 |
BbMult |
Deviations between the average and each rail. The shipped setting keeps most closes inside. | 2.0 |
Display settings
| Setting | What it does | Default |
|---|---|---|
ArrowOffsetPts |
Distance in points from the wick to its marker. Raise it where candle ranges run large. | 30 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
(see inputs panel) | on |
EnablePopup |
(see inputs panel) | on |
EnablePushNotify |
(see inputs panel) | off |
EnableEmail |
(see inputs panel) | off |
EnableSound |
(see inputs panel) | off |
SoundFile |
(see inputs panel) | alert.wav |

Settings that fit your chart
Fading works where price keeps coming back. Major pairs on M15 through H4 suit this build best. EURUSD on H1 shows the pattern the screenshots use, with several clean re-entries a session. Deviation rails widen on gold and index CFDs. That cuts the arrow count and lengthens the moves that follow.
When the Bollinger bands alert Indicator fails
Walking the band destroys the signal. In a strong trend price closes outside the rail bar after bar. Each brief close back inside prints an arrow into an ongoing move.
Volatility shifts change the meaning. A rail sitting twenty pips from the average today may sit sixty next week. An arrow at one setting is not the same event a month later.
Two bars is a thin filter. Nothing here checks trend, range width or the depth of the excursion. A one pip poke outside the rail counts the same as a deep stretch.
The average offers no support. Traders often place a first target at Mid, then watch price run straight through it in a trending market.
Copy bollinger-bands-alert-indicator-forexmt4systems.ex4 into MQL4/Indicators and bollinger-bands-alert-indicator-forexmt4systems.ex5 into MQL5/Indicators, then restart the terminal and drag the Bollinger bands alert Indicator onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.
Download the Bollinger bands alert Indicator for MT4 and MT5
The zip bollinger-bands-alert-indicator-forexmt4systems.zip holds bollinger-bands-alert-indicator-forexmt4systems.ex4, bollinger-bands-alert-indicator-forexmt4systems.ex5 and a short README, compiled files only. 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 has to happen before a Buy arrow prints under a candle?
Two closes in sequence. The earlier bar must close below Lower. The bar after it must close at or above Lower. Only then does the marker appear, offset under the wick by ArrowOffsetPts. A single bar poking outside the rail with no close back inside prints nothing.
How far apart do Upper and Lower sit at the shipped BbMult?
Two standard deviations sit on each side of the average, so the pair spans about four in total. That width holds most closes inside on a normal chart. Raising the multiplier widens it further and thins the arrow count. Lowering it does the opposite.
Does the Mid line work as a target after a re-entry?
Often, but not always. Price closing back inside a band frequently drifts toward the average. That is why many traders park a first target there. In a trending market the average offers nothing and price passes through. Check how your instrument behaves before relying on it.
Why do arrows disappear from the oldest part of the chart?
Drawing starts a couple of bars past the BbPeriod window. The earliest bars therefore carry no bands and no markers at all. Beyond that point, arrows stay where they printed. If a marker vanishes elsewhere, the chart most likely reloaded history from a different first bar.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Bollinger bands alert Indicator as one input. Always backtest before trading live.
Category: this is part of our Volatility collection. Next, plainly, 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 Bollinger Bands on Wikipedia.
- For broader market context, see ibands (BANDS) at the MQL5 Documentation.
