Bollinger Bands with Alert
Nov 24, 2018

The Bollinger Bands with Alert indicator provides a triple-layered volatility envelope system designed to help traders identify overextended market conditions and potential trend reversals. By plotting three distinct sets of Bollinger Bands based on a customizable moving average, this tool offers a comprehensive view of price action relative to statistical volatility levels.
Usage
The tool can be used to identify support and resistance zones based on standard deviations. Traders often look for "outside" crosses to identify potential exhausts in price movement or "inside" crosses to signal a return to the mean.
- Volatility Analysis: Using three sets of bands (e.g., 1, 2, and 3 standard deviations) allows users to visualize the strength of a price move. Price staying between the second and third bands often indicates a strong trend.
- Mean Reversion: When price crosses outside the third band and subsequently crosses back inside, it may signal a potential mean reversion trade toward the basis line.
- Alert Customization: The script features a dedicated alert system where users can specify which band level (1, 2, or 3) triggers the notification and whether the alert should trigger when the price moves "Outside" (breakout/exhaustion) or "Inside" (re-entry/reversion) the selected band.
Details
The indicator calculates a central basis line using a choice of Simple Moving Average (SMA), Exponential Moving Average (EMA), or Smoothed Moving Average (SMMA). From this basis, three pairs of bands are projected using the standard deviation of the source price multiplied by user-defined coefficients.
The alert logic is highly flexible, allowing users to define specific sources for the upper and lower crosses (such as High and Low prices respectively) to reduce noise and ensure alerts are triggered only by meaningful price extremes.
Settings
- SMA length: Sets the lookback period for the moving average basis and the standard deviation calculation.
- Source: The price input used for calculating the basis and volatility.
- MA select: Choose between SMA, EMA, or SMMA for the central basis line.
- BB1/2/3 mult: Multipliers for the standard deviation to determine the width of each of the three band sets.
- display BB1/2/3: Toggles the visibility of each specific band set on the chart.
- BB for alert number: Selects which band (1, 2, or 3) will be used to trigger the alert conditions.
- BB upper/lower cross source: Defines which price source (e.g., High, Low, or Close) must cross the bands to trigger an alert.
- cross select: Determines the direction of the alert trigger—"Outside" for price moving beyond the bands or "Inside" for price returning within the bands.
FAQ
How do I access Bollinger Bands with Alert?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Can I change the type of moving average used?
Yes, the indicator allows you to select between SMA, EMA, and SMMA via the "MA select" dropdown in the settings menu.
How do the alerts work?
Alerts are triggered based on your selection in the "BB for alert number" and "cross select" settings. You can be notified when the price moves outside a specific volatility threshold or when it crosses back inside.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.