OPEN-SOURCE SCRIPT
ATR Bands (MA Distance)

ATR Bands (MA Distance) plots volatility-based bands at a multiple of ATR away from a selected moving average.
Unlike percentage envelopes or standard deviation bands, this indicator measures distance from the moving average using ATR, representing the market’s normal “breathing range” rather than statistical probability.
Key Features
Intended Use
ATR Bands (MA Distance) is best used as a context and preparation tool, not as a direct entry or exit signal.
Typical use cases include:
Important Notes / How NOT to Use
For best results:
Concept Summary (Short)
ATR Bands (MA Distance) visualize how far price has moved from its moving average in terms of volatility, without repainting and without relying on percentage deviation or statistical assumptions.
Optional Short Description (Preview)
Volatility-based, non-repainting ATR bands plotted at a distance from a moving average.
Designed for market context and trade preparation — not standalone signals.
Unlike percentage envelopes or standard deviation bands, this indicator measures distance from the moving average using ATR, representing the market’s normal “breathing range” rather than statistical probability.
Key Features
- The center line is a selectable moving average (EMA, SMA, RMA/Wilder, or WMA).
- Upper and lower bands are calculated as:
Moving Average ± ATR × Multiplier - Band width automatically adapts to changing market volatility.
- Designed for consistent use across different markets and timeframes without parameter re-optimization.
- Non-repainting: all values are calculated only from confirmed historical bars.
Intended Use
ATR Bands (MA Distance) is best used as a context and preparation tool, not as a direct entry or exit signal.
Typical use cases include:
- Identifying areas where price is extended relative to its recent volatility.
- Visualizing normal vs. stretched price distance from the moving average.
- Supporting range-based analysis or trade preparation when combined with other indicators (e.g., oscillators).
Important Notes / How NOT to Use
- This indicator does NOT generate buy or sell signals by itself.
- Touching or crossing a band does not imply an automatic reversal.
- In strong trending markets, price may stay outside the bands for extended periods.
- ATR Bands should not be interpreted as overbought/oversold levels on their own.
- This indicator does NOT repaint. Once a bar is closed, its values will not change.
For best results:
- Use ATR Bands as a preparation zone, then wait for confirmation from your own entry logic.
- Disable or ignore band-based mean-reversion ideas during strong trend conditions.
Concept Summary (Short)
ATR Bands (MA Distance) visualize how far price has moved from its moving average in terms of volatility, without repainting and without relying on percentage deviation or statistical assumptions.
Optional Short Description (Preview)
Volatility-based, non-repainting ATR bands plotted at a distance from a moving average.
Designed for market context and trade preparation — not standalone signals.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.