OPEN-SOURCE SCRIPT
Volatility Quality [Alpha Extract]

The Alpha-Extract Volatility Quality (AVQ) Indicator provides traders with deep insights into market volatility by measuring the directional strength of price movements. This sophisticated momentum-based tool helps identify overbought and oversold conditions, offering actionable buy and sell signals based on volatility trends and standard deviation bands.
🔶 CALCULATION
The indicator processes volatility quality data through a series of analytical steps:
🔶 DETAILS
Visual Features:
Interpretation:
🔶 EXAMPLES


🔶 SETTINGS
Customization Options:
The Alpha-Extract Volatility Quality Indicator empowers traders with a robust tool to navigate market volatility. By combining directional price range analysis with smoothed volatility metrics, it identifies overbought and oversold conditions, offering clear buy and sell signals. The customizable standard deviation bands and optional normalization provide precise context for market conditions, enabling traders to make informed decisions across various market cycles.
🔶 CALCULATION
The indicator processes volatility quality data through a series of analytical steps:
- Bar Range Calculation: Measures true range (TR) to capture price volatility.
- Directional Weighting: Applies directional bias (positive for bullish candles, negative for bearish) to the true range.
- VQI Computation: Uses an exponential moving average (EMA) of weighted volatility to derive the Volatility Quality Index (VQI).
Pine Script® vqiRaw = ta.ema(weightedVol, vqiLen) - Smoothing: Applies an additional EMA to smooth the VQI for clearer signals.
- Normalization: Optionally normalizes VQI to a -100/+100 scale based on historical highs and lows.
- Standard Deviation Bands: Calculates three upper and lower bands using standard deviation multipliers for volatility thresholds.
Pine Script® vqiStdev = ta.stdev(vqiSmoothed, vqiLen) upperBand1 = vqiSmoothed + (vqiStdev * stdevMultiplier1) upperBand2 = vqiSmoothed + (vqiStdev * stdevMultiplier2) upperBand3 = vqiSmoothed + (vqiStdev * stdevMultiplier3) lowerBand1 = vqiSmoothed - (vqiStdev * stdevMultiplier1) lowerBand2 = vqiSmoothed - (vqiStdev * stdevMultiplier2) lowerBand3 = vqiSmoothed - (vqiStdev * stdevMultiplier3) - Signal Generation: Produces overbought/oversold signals when VQI reaches extreme levels (±200 in normalized mode).
- Formula:
- Bar Range = True Range (TR)
- Weighted Volatility = Bar Range × (Close > Open ? 1 : Close < Open ? -1 : 0)
- VQI Raw = EMA(Weighted Volatility, VQI Length)
- VQI Smoothed = EMA(VQI Raw, Smoothing Length)
- VQI Normalized = ((VQI Smoothed - Lowest VQI) / (Highest VQI - Lowest VQI) - 0.5) × 200
- Upper Band N = VQI Smoothed + (StdDev(VQI Smoothed, VQI Length) × Multiplier N)
- Lower Band N = VQI Smoothed - (StdDev(VQI Smoothed, VQI Length) × Multiplier N)
🔶 DETAILS
Visual Features:
- VQI Plot: Displays VQI as a line or histogram (lime for positive, red for negative).
- Standard Deviation Bands: Plots three upper and lower bands (teal for upper, grayscale for lower) to indicate volatility thresholds.
- Reference Levels: Horizontal lines at 0 (neutral), +100, and -100 (in normalized mode) for context.
- Zone Highlighting: Overbought (⋎ above bars) and oversold (⋏ below bars) signals for extreme VQI levels (±200 in normalized mode).
- Candle Coloring: Optional candle overlay colored by VQI direction (lime for positive, red for negative).
Interpretation:
- VQI ≥ 200 (Normalized): Overbought condition, strong sell signal.
- VQI 100–200: High volatility, potential selling opportunity.
- VQI 0–100: Neutral bullish momentum.
- VQI 0 to -100: Neutral bearish momentum.
- VQI -100 to -200: High volatility, strong bearish momentum.
- VQI ≤ -200 (Normalized): Oversold condition, strong buy signal.
🔶 EXAMPLES
- Overbought Signal Detection: When VQI exceeds 200 (normalized), the indicator flags potential market tops with a red ⋎ symbol.
- Example: During strong uptrends, VQI reaching 200 has historically preceded corrections, allowing traders to secure profits.
- Oversold Signal Detection: When VQI falls below -200 (normalized), a lime ⋏ symbol highlights potential buying opportunities.
- Example: In bearish markets, VQI dropping below -200 has marked reversal points for profitable long entries.
- Volatility Trend Tracking: The VQI plot and bands help traders visualize shifts in market momentum.
- Example: A rising VQI crossing above zero with widening bands indicates strengthening bullish momentum, guiding traders to hold or enter long positions.
- Dynamic Support/Resistance: Standard deviation bands act as dynamic volatility thresholds during price movements.
- Example: Price reversals often occur near the third standard deviation bands, providing reliable entry/exit points during volatile periods.
🔶 SETTINGS
Customization Options:
- VQI Length: Adjust the EMA period for VQI calculation (default: 14, range: 1–50).
- Smoothing Length: Set the EMA period for smoothing (default: 5, range: 1–50).
- Standard Deviation Multipliers: Customize multipliers for bands (defaults: 1.0, 2.0, 3.0).
- Normalization: Toggle normalization to -100/+100 scale and adjust lookback period (default: 200, min: 50).
- Display Style: Switch between line or histogram plot for VQI.
- Candle Overlay: Enable/disable VQI-colored candles (lime for positive, red for negative).
The Alpha-Extract Volatility Quality Indicator empowers traders with a robust tool to navigate market volatility. By combining directional price range analysis with smoothed volatility metrics, it identifies overbought and oversold conditions, offering clear buy and sell signals. The customizable standard deviation bands and optional normalization provide precise context for market conditions, enabling traders to make informed decisions across various market cycles.
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.
Access more of our systems and insights at alphaextract.xyz
All analysis provided by Alpha Extract is for educational and informational purposes only.
All analysis provided by Alpha Extract is for educational and informational purposes only.
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.
Access more of our systems and insights at alphaextract.xyz
All analysis provided by Alpha Extract is for educational and informational purposes only.
All analysis provided by Alpha Extract is for educational and informational purposes only.
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.