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.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.