OPEN-SOURCE SCRIPT
Volatility Surge Strategy

█ 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.
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.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。