OPEN-SOURCE SCRIPT
Volatility-Adaptive Moving Average | TR

📝 Overview
This indicator combines a volatility-adaptive moving average with dynamic period adjustment, creating a responsive trend-following system that automatically adjusts to changing market conditions.
The core concept is simple yet powerful: when volatility increases, the moving average becomes more responsive; when volatility decreases, it smooths out – reducing lag while filtering out noise.
⚙️ Key Features
📊 Smart Moving Average Engine
Choose from 15 different MA types:
Standard: EMA, SMA, RMA, WMA, VWMA
Advanced: HMA, SWMA, ALMA, DEMA, FRAMA, KAMA
Complex: T3, T3ALT, TEMA, TRIMA
🔄 Dynamic Period Adjustment
Period changes automatically based on volatility ratio
Uses ATR (Average True Range) to measure current market volatility
Can be smoothed for more stable period transitions
🎯 Visual Signals
Clear BUY/SELL labels on price crossovers
Volatility bands that expand/contract with market conditions
Real-time info label showing key metrics
Statistics table with all important values
🎨 Color Customization
9 different color schemes to match your chart style:
Classic, Modern, Heat, Robust, Accented, Monochrome, Moderate, Aqua, Cosmic
🔧 How It Works
ATR Calculation: Measures current market volatility
Average ATR: Establishes baseline volatility
Volatility Ratio: Compares current vs average volatility
Dynamic Period: Adjusts MA length based on this ratio
Adaptive MA: Plots the volatility-adjusted moving average
📈 Use Cases
✅ Trend Following – Capture trends early without excessive whipsaws
✅ Volatility Trading – Adjust position sizing based on market conditions
✅ Entry/Exit Signals – Get clear crossover signals with minimal lag
✅ Market Analysis – Visualize volatility expansion/contraction in real-time
This indicator combines a volatility-adaptive moving average with dynamic period adjustment, creating a responsive trend-following system that automatically adjusts to changing market conditions.
The core concept is simple yet powerful: when volatility increases, the moving average becomes more responsive; when volatility decreases, it smooths out – reducing lag while filtering out noise.
⚙️ Key Features
📊 Smart Moving Average Engine
Choose from 15 different MA types:
Standard: EMA, SMA, RMA, WMA, VWMA
Advanced: HMA, SWMA, ALMA, DEMA, FRAMA, KAMA
Complex: T3, T3ALT, TEMA, TRIMA
🔄 Dynamic Period Adjustment
Period changes automatically based on volatility ratio
Uses ATR (Average True Range) to measure current market volatility
Can be smoothed for more stable period transitions
🎯 Visual Signals
Clear BUY/SELL labels on price crossovers
Volatility bands that expand/contract with market conditions
Real-time info label showing key metrics
Statistics table with all important values
🎨 Color Customization
9 different color schemes to match your chart style:
Classic, Modern, Heat, Robust, Accented, Monochrome, Moderate, Aqua, Cosmic
🔧 How It Works
ATR Calculation: Measures current market volatility
Average ATR: Establishes baseline volatility
Volatility Ratio: Compares current vs average volatility
Dynamic Period: Adjusts MA length based on this ratio
Adaptive MA: Plots the volatility-adjusted moving average
📈 Use Cases
✅ Trend Following – Capture trends early without excessive whipsaws
✅ Volatility Trading – Adjust position sizing based on market conditions
✅ Entry/Exit Signals – Get clear crossover signals with minimal lag
✅ Market Analysis – Visualize volatility expansion/contraction in real-time
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.