OPEN-SOURCE SCRIPT
20 MA with ATR

This indicator overlays a Moving Average (SMA or EMA) on the chart, along with dynamic upper and lower bands based on the Average True Range (ATR). It's designed to help you track long-term trend direction and volatility zones with clarity — ideal for monthly or higher timeframe analysis.
What It Does ?
Plots a Simple or Exponential Moving Average (MA) of a chosen price (default is Low).
Adds two dynamic bands:
Upper Band = MA + ATR
Lower Band = MA - ATR
Uses ATR (Average True Range) to represent market volatility and distance from the moving average.
Why Use This?
This indicator blends trend and volatility awareness into a single view:
Use the MA as a long-term trend guide.
Use the ATR bands to identify:
Potential buy zones near lower band during uptrends.
Caution zones near upper band where price may be extended.
On monthly charts, this helps long-term investors spot deep-value or extended price levels based on both trend and volatility.
Customizable Inputs
MA Type: SMA or EMA
MA Length: Default is 20 periods (great for monthly swing cycles)
ATR Length: Default is 14 (standard volatility window)
Input Source: Use Low, Close, or any price point for flexibility
Suggested Use (Monthly Charts)
Track when price pulls back toward the lower ATR band for potential accumulation zones.
Monitor breakouts above the upper ATR band as signs of momentum continuation.
Spot trend exhaustion when price hugs an ATR band for too long.
Ideal For:
Long-term investors and swing traders
Value buyers looking for low-risk re-entries in trends
Portfolio positioning during market extremes
What It Does ?
Plots a Simple or Exponential Moving Average (MA) of a chosen price (default is Low).
Adds two dynamic bands:
Upper Band = MA + ATR
Lower Band = MA - ATR
Uses ATR (Average True Range) to represent market volatility and distance from the moving average.
Why Use This?
This indicator blends trend and volatility awareness into a single view:
Use the MA as a long-term trend guide.
Use the ATR bands to identify:
Potential buy zones near lower band during uptrends.
Caution zones near upper band where price may be extended.
On monthly charts, this helps long-term investors spot deep-value or extended price levels based on both trend and volatility.
Customizable Inputs
MA Type: SMA or EMA
MA Length: Default is 20 periods (great for monthly swing cycles)
ATR Length: Default is 14 (standard volatility window)
Input Source: Use Low, Close, or any price point for flexibility
Suggested Use (Monthly Charts)
Track when price pulls back toward the lower ATR band for potential accumulation zones.
Monitor breakouts above the upper ATR band as signs of momentum continuation.
Spot trend exhaustion when price hugs an ATR band for too long.
Ideal For:
Long-term investors and swing traders
Value buyers looking for low-risk re-entries in trends
Portfolio positioning during market extremes
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.