Turbulence Fractal Scanner [JOAT]Turbulence Fractal Scanner
Introduction
The Turbulence Fractal Scanner is an advanced open-source volatility chaos prediction engine that combines ATR, Bollinger Band Width, Keltner Channels, Historical Volatility, and Squeeze detection into a unified volatility analysis system. This indicator measures market turbulence across multiple dimensions, creating a comprehensive volatility index that reveals expansion/contraction cycles, squeeze conditions, and breakout predictions.
Unlike single-dimension volatility indicators, the Turbulence Fractal Scanner provides multi-layered volatility intelligence through percentile ranking, composite indexing, regime classification, and squeeze detection. The indicator is designed for traders who understand that volatility precedes price movement and that multi-dimensional volatility analysis provides early warning of significant market shifts.
Why This Indicator Exists
This indicator addresses the need for comprehensive volatility analysis that goes beyond simple ATR or Bollinger Bands. By combining five distinct volatility methodologies, it reveals:
ATR Analysis: Average True Range measures actual price movement volatility
Bollinger Band Width: Measures price dispersion relative to moving average
Keltner Channels: ATR-based bands for volatility envelope detection
Historical Volatility: Statistical measure of price returns volatility
Squeeze Detection: Identifies when Bollinger Bands contract inside Keltner Channels
Composite Volatility Index: Unified measure combining all five components
Regime Classification: Categorizes volatility as Low, Normal, High, or Squeeze
Breakout Prediction: Detects squeeze breakouts with directional bias
Core Components Explained
1. ATR (Average True Range) Analysis
ATR measures the average range of price movement:
True Range: Maximum of (high - low), (high - previous close), (previous close - low)
ATR Calculation: Moving average of true range over period (default 14)
ATR Smoothing: Additional EMA smoothing (default 7) reduces noise
ATR Percent: ATR divided by close, expressed as percentage
ATR Percentile: ATR ranked against 100-bar history (0-100 scale)
ATR percentile shows whether current volatility is high or low relative to recent history. High percentile (> 70) indicates elevated volatility, low percentile (< 30) indicates compressed volatility.
2. Bollinger Band Width Analysis
BB Width measures price dispersion:
Bollinger Bands: SMA ± (standard deviation × multiplier)
BB Width: (Upper band - Lower band) / Middle band × 100
BB Width Percentile: Current width ranked against 100-bar history
Narrow BB Width indicates low volatility and potential breakout setup. Wide BB Width indicates high volatility and potential mean reversion.
3. Keltner Channel Analysis
Keltner Channels use ATR for volatility bands:
Basis: EMA of close (default 20 periods)
Range: ATR × multiplier (default 1.5)
Upper/Lower: Basis ± Range
Keltner Channels adapt to volatility changes and are used in squeeze detection.
4. Squeeze Detection
Squeeze occurs when Bollinger Bands contract inside Keltner Channels:
Squeeze On: BB Lower > KC Lower AND BB Upper < KC Upper
Squeeze Off: Bands no longer contracted
Squeeze Breakout: Transition from Squeeze On to Squeeze Off
Breakout Direction: Determined by close comparison (close > close = bullish)
Squeezes indicate extreme volatility compression. Breakouts from squeezes often lead to significant directional moves.
5. Historical Volatility (HV) Calculation
HV measures statistical volatility of returns:
Returns: Logarithmic price changes (log(close / close ))
Standard Deviation: StdDev of returns over period (default 20)
Annualization: Multiply by sqrt(252) for annual volatility (optional)
HV Percentile: Current HV ranked against 100-bar history
HV provides a statistical measure of actual price volatility, complementing the technical measures (ATR, BB Width).
6. Composite Volatility Index
All three percentile measures are combined into a unified index:
Volatility Index = (ATR Percentile + BB Width Percentile + HV Percentile) / 3
This composite index provides a balanced view of volatility across multiple methodologies. Values range from 0 (extremely low volatility) to 100 (extremely high volatility).
7. Volatility Regime Classification
The indicator classifies volatility into four regimes:
Squeeze (Priority): When squeeze is active, regardless of volatility index
Low Volatility: Volatility Index < threshold (default 30)
Normal Volatility: Volatility Index between low and high thresholds (30-70)
High Volatility: Volatility Index > threshold (default 70)
Regime classification helps traders adapt strategies to current volatility conditions.
8. Volatility Trend Analysis
The indicator tracks volatility direction:
Volatility Trend: 5-period SMA of Volatility Index
Rising Volatility: Trend rising for 3+ consecutive bars
Falling Volatility: Trend falling for 3+ consecutive bars
Expansion: Volatility Index rising for 3+ consecutive bars
Contraction: Volatility Index falling for 3+ consecutive bars
Volatility trends help predict whether turbulence is increasing or decreasing.
9. Breakout Prediction System
The indicator predicts breakouts from squeeze conditions:
Squeeze Breakout: Detected when squeeze transitions from On to Off
Direction: Bullish if close > close , bearish if close < close
Volatility Confirmation: Best breakouts occur when Volatility Index < 40 (compressed)
Breakouts from low volatility squeezes often lead to sustained directional moves.
10. Turbulence Shift Detection
The indicator identifies regime changes:
Regime Shift: When volatility regime changes (Low ↔ Normal ↔ High ↔ Squeeze)
Anti-Overlap: Minimum 10 bars between shift signals
High Vol Entry: Shift into High Volatility regime
Low Vol Entry: Shift into Low Volatility regime
Regime shifts provide early warning of changing market conditions.
Visual Elements
Volatility Index Line: Main line showing composite volatility with regime-based coloring (purple = squeeze, red = high, cyan = low, yellow = normal)
Component Lines: Three thin lines showing ATR, BB Width, and HV percentiles
Volatility Trend Line: Step-line showing smoothed volatility trend
Threshold Lines: Horizontal lines at high (70) and low (30) thresholds, plus median (50)
Zone Fills: Shaded areas above high threshold (red) and below low threshold (cyan)
Squeeze Background: Purple background when squeeze is active
Breakout Signals: Triangles marking squeeze breakouts (cyan = bullish, red/orange = bearish)
Regime Shift Circles: Small circles marking regime transitions
Information Dashboard: Displays regime, volatility index, ATR/BB/HV percentiles, squeeze status, volatility trend, expansion/contraction, breakout status, ATR/BB values, and overall signal
How to Use This Indicator
Step 1: Check Volatility Regime
Monitor the dashboard for current regime (Squeeze, Low Vol, Normal, High Vol). Adapt strategy to regime.
Step 2: Monitor Volatility Index
Volatility Index < 30 = compressed (potential breakout setup)
Volatility Index > 70 = elevated (potential mean reversion or continuation)
Step 3: Watch for Squeeze Conditions
Purple background indicates squeeze. Prepare for breakout when squeeze ends.
Step 4: Identify Breakout Direction
When squeeze breakout occurs, triangle color shows direction (cyan = bullish, red = bearish).
Step 5: Check Volatility Trend
Rising volatility = increasing turbulence, falling volatility = calming conditions.
Step 6: Monitor Expansion/Contraction
Expanding volatility often precedes strong moves. Contracting volatility suggests consolidation.
Step 7: Use Regime Shifts as Alerts
Shifts into High Vol or Low Vol regimes provide early warning of changing conditions.
Best Practices
Trade breakouts from squeeze conditions with low volatility index (< 40)
Avoid trend-following strategies in high volatility regimes (> 70)
Use low volatility regimes (< 30) to prepare for breakout setups
Monitor all three components (ATR, BB, HV) for confirmation
Rising volatility in low regime warns of impending breakout
Falling volatility in high regime suggests consolidation ahead
Combine with trend indicators - volatility shows when, trend shows direction
Be cautious of false breakouts - wait for volatility confirmation
Input Parameters
ATR Configuration:
ATR Length: Period for ATR calculation (default: 14)
ATR Smoothing: EMA smoothing period (default: 7)
Bollinger Bands:
BB Length: Period for BB calculation (default: 20)
BB Multiplier: Standard deviation multiplier (default: 2.0)
Keltner Channels:
KC Length: Period for KC basis (default: 20)
KC Multiplier: ATR multiplier for bands (default: 1.5)
Historical Volatility:
HV Length: Period for HV calculation (default: 20)
Annualize HV: Convert to annual volatility (default: enabled)
Regime Thresholds:
Low Volatility: Threshold for low regime (default: 30)
High Volatility: Threshold for high regime (default: 70)
Visual Configuration:
Low/Normal/High/Squeeze Colors: Customizable regime colors
Originality Statement
This indicator is original in its comprehensive volatility analysis approach. While individual components (ATR, BB, KC, HV, Squeeze) are established concepts, this indicator is justified because:
It combines five distinct volatility methodologies into a unified composite index
Percentile ranking normalizes all components to a common 0-100 scale
The regime classification system categorizes volatility conditions systematically
Squeeze detection with breakout prediction provides actionable trading signals
Volatility trend and expansion/contraction analysis predict volatility direction
Turbulence shift detection identifies regime changes early
The comprehensive dashboard presents all volatility dimensions simultaneously
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Volatility analysis does not guarantee profitable trades. Low volatility does not guarantee breakouts. High volatility does not guarantee reversals. Always use proper risk management and never risk more than you can afford to lose.
-Made with passion by officialjackofalltrades
Pine Script® indicator






















