All indicators

Bollinger Bands with ATR(Percent)

Jul 18, 2016

Static chart image
SignalsChannelsMoving AveragesVolatility

The Bollinger Bands with ATR(Percent) indicator provides a volatility-based envelope that utilizes an Average True Range (ATR) Percentage calculation to determine band width, offering a smoother alternative to standard Bollinger Bands while maintaining sensitivity to price divergences.

Usage

The Usage section focuses on identifying volatility shifts and potential price reversals. Because the bands are calculated using a percentage-based ATR, they adapt to the relative volatility of the asset rather than absolute price changes.

  • Mean Reversion: Traders often look for price to return to the red basis line after touching or exceeding the blue outer bands.
  • Volatility Breakouts: A cross above the upper band or below the lower band can signal a surge in momentum, often used to identify the start of a trend or a significant volatility expansion.
  • Divergences: By observing how price interacts with the bands compared to previous swings, users can identify momentum exhaustion even when volatility remains high.

Details

This script replaces the standard deviation calculation found in traditional Bollinger Bands with a custom ATR Percentage (ATRP) logic.

  1. True Range Calculation: The script determines the maximum range between the current high/low and the previous close.
  2. Percentage Normalization: The True Range is converted into a percentage relative to the price level, ensuring the bands remain proportional to the asset's price.
  3. Smoothing: An exponential smoothing process is applied to the ATR percentage to create a "smoother" envelope that reacts less erratically to single-bar outliers compared to standard deviation.

Settings

  • ATRP (Length): The lookback period used for the ATR Percentage calculation. Higher values result in smoother, slower-moving bands.
  • BB (Length): The period used for the Simple Moving Average (SMA) that serves as the basis line.
  • Source: The price data point used for calculations (default is Close).
  • Multiplier: The factor applied to the ATRP value to expand or contract the width of the upper and lower bands.

FAQ

How do I access Bollinger Bands with ATR(Percent)?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

How does this differ from standard Bollinger Bands?

While standard Bollinger Bands use standard deviation to measure volatility, this tool uses a percentage-based ATR. This often results in smoother band movements and can be more consistent across assets with different price scales.

Can I use this for alert notifications?

Yes, the script includes built-in alert conditions that trigger when the price crosses above the upper band or below the lower band, allowing for real-time monitoring of volatility breakouts.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.