OPEN-SOURCE SCRIPT

Volatility Surge Strategy

427
█ OVERVIEW

Volatility Surge Strategy (VSS) is an original indicator inspired by the concept of the Williams VIX Fix — a method of measuring the depth of price decline from a recent high to replicate VIX-like behavior on any instrument.

This script is a fully independent implementation built from scratch. The core calculation concept (drop depth from highest close) is a publicly known mathematical formula with no copyright. All Pine Script code is original.

█ HOW IT WORKS

• Volatility Index (VI): Measures how far the current low has dropped from the highest close over a lookback period, expressed as a percentage.
• BB Filter: Applies a Bollinger Band to the VI. When VI exceeds the upper band, a volatility spike is detected.
• Switch Signal: Triggers an entry when the candle direction flips (bearish → bullish or vice versa) while a spike is still active — catching the moment momentum begins to shift.

█ ENTRY LOGIC

• Bullish Switch: Spike active on two consecutive bars + previous bar bearish + current bar bullish → Long entry
• Bearish Switch: Spike active on two consecutive bars + previous bar bullish + current bar bearish → Short entry
• All entries fire only on confirmed bars (barstate.isconfirmed)

█ RISK MANAGEMENT

• Stop Loss: ATR × SL Multiplier below/above entry close
• Take Profit: SL distance × Risk/Reward Ratio
• Fixed lot size (1 unit default)
• Commission: 0.05% per side | Slippage: 2 ticks

█ SETTINGS

Volatility Index
• Lookback Period (default 22) — reference window for highest close; increase to reduce sensitivity

BB Filter
• BB Period (default 20) — smoothing window for VI
• BB Multiplier (default 2.0) — spike detection threshold; increase to require stronger moves

Risk Management
• ATR Period (default 14)
• SL ATR Multiplier (default 1.5)
• Risk/Reward Ratio (default 1.5)

█ ALERTS

• High Volatility — VI crosses above the upper band (either candle direction)
• Bullish Switch — spike active, candle flips bearish → bullish
• Bearish Switch — spike active, candle flips bullish → bearish

Set alerts to "Once Per Bar Close" for best accuracy.

█ NOTES

• This indicator works best as a filter or confirmation tool combined with trend direction, key levels, or divergence signals.
• Short timeframes tend to produce noise; higher timeframes (daily and above) show more stable results in testing.
• Past performance does not guarantee future results.

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.