OPEN-SOURCE SCRIPT
更新済 Vortex Volatility Engine [Pineify]

Vortex Volatility Engine: Advanced Directional Volatility Momentum Indicator with Squeeze Detection
The Vortex Volatility Engine is a sophisticated momentum oscillator that combines directional volatility analysis with squeeze detection to identify high-probability trading opportunities. Unlike traditional volatility indicators that simply measure price dispersion, this indicator decomposes volatility into bullish and bearish components, revealing the underlying directional strength of market movements. By integrating True Range normalization, directional momentum filtering, and dynamic volatility bands, it provides traders with a comprehensive framework for detecting volatility compression periods (squeezes) and subsequent explosive breakout signals.
Key Features
How It Works
The Vortex Volatility Engine employs a multi-stage calculation methodology that transforms raw price data into actionable volatility intelligence:
Stage 1: True Range Baseline Calculation
The indicator begins by calculating a smoothed True Range using the Running Moving Average (RMA) method over the user-defined lookback period (default 14 bars). True Range captures the maximum of three values: current high-low range, absolute value of high minus previous close, and absolute value of low minus previous close. This provides a comprehensive measure of actual market volatility that accounts for gaps and limit moves.
Stage 2: Directional Volatility Separation
Price changes are decomposed into two distinct components:
Stage 3: Power Normalization
Both directional volatility components are normalized against the True Range baseline and converted to a 0-100 scale:
This normalization ensures that the indicator adapts to different volatility regimes and instruments. Values above 50 indicate bullish dominance, while values below 50 indicate bearish dominance.
Stage 4: Vortex Delta Calculation
The core signal is derived by subtracting Bear Power from Bull Power, creating the Vortex Delta. This delta is then smoothed using a Simple Moving Average (default 5 periods) to reduce noise and prevent false signals. Positive delta values indicate bullish volatility dominance, while negative values indicate bearish dominance.
Stage 5: Squeeze Detection Logic
The indicator compares short-term True Range (using the primary length parameter) against a long-term True Range baseline (3× the primary length). When short-term volatility falls below a user-defined threshold (default 0.8× the long-term average), a squeeze condition is triggered. This identifies consolidation periods where the market is "coiling" before a potential explosive move.
Stage 6: Dynamic Band Construction
Upper and lower volatility bands are constructed using:
These bands create adaptive thresholds that expand during high-volatility periods and contract during low-volatility periods, providing context-aware breakout detection.
Trading Ideas and Insights
Breakout Trading Strategy
The primary trading methodology involves waiting for squeeze periods followed by volatility expansion breakouts:
Trend Continuation Signals
Use the histogram color gradient to identify trend strength:
Mean Reversion Opportunities
When the Vortex Delta reaches extreme levels outside the dynamic bands but fails to sustain momentum (color shifts from bright to dim), this can signal exhaustion and potential mean reversion back toward the zero line or basis.
How Multiple Indicators Work Together
The Vortex Volatility Engine integrates four distinct analytical components into a unified framework:
1. True Range Foundation
Provides the volatility baseline that normalizes all other calculations, ensuring the indicator adapts to different market conditions and instruments without requiring recalibration.
2. Directional Momentum Decomposition
By separating upward and downward price movements, the indicator reveals which side controls the market. This is superior to simple momentum oscillators that only show net movement, as it exposes the underlying battle between bulls and bears.
3. Squeeze Detection System
The squeeze component acts as a filter and setup identifier. By comparing short-term versus long-term volatility, it identifies periods of compression that historically precede significant directional moves. This prevents traders from taking breakout signals during normal volatility fluctuations.
4. Dynamic Volatility Bands
The standard deviation-based bands provide context-aware thresholds that adapt to changing market regimes. During high-volatility periods, the bands widen to prevent false signals. During low-volatility periods, they contract to capture smaller but significant moves.
Synergistic Integration:
These components work together in a logical sequence: True Range establishes the baseline → Directional decomposition reveals momentum → Squeeze detection identifies setup periods → Dynamic bands define breakout thresholds. Each component enhances the others, creating a robust system that filters noise while capturing genuine volatility expansion events.
Unique Aspects
How to Use
Adding to Your Chart
Interpreting Signals
Setting Up Alerts
Customization
Volatility Length (Default: 14)
Controls the lookback period for True Range and directional momentum calculations. Lower values (8-10) create a more responsive indicator suitable for intraday trading and volatile markets. Higher values (20-30) produce smoother signals better suited for swing trading and trending markets. Adjust based on your trading timeframe and market conditions.
Signal Smoothing (Default: 5)
Applies final smoothing to the Vortex Delta histogram to reduce noise and prevent whipsaws. Lower values (2-3) maintain responsiveness but may generate more false signals. Higher values (7-10) create cleaner signals but with increased lag. Use lower smoothing for scalping, higher smoothing for position trading.
Squeeze Threshold (Default: 0.8)
Determines how strict the squeeze detection is. Lower values (0.6-0.7) require more significant volatility compression, resulting in fewer but higher-quality squeeze signals. Higher values (0.9-1.0) detect squeezes more frequently but may include less significant consolidations. Adjust based on your preferred trade frequency.
Volatility Band Multiplier (Default: 2.0)
Controls the width of the dynamic volatility bands. Lower values (1.5-1.8) create tighter bands that generate more frequent breakout signals but with higher false positive rates. Higher values (2.5-3.0) create wider bands that filter out noise but may miss smaller breakout opportunities. Optimize based on backtesting results for your specific instrument and timeframe.
Recommended Settings by Trading Style
Conclusion
The Vortex Volatility Engine represents a comprehensive approach to volatility-based momentum trading by combining directional decomposition, squeeze detection, and adaptive band analysis into a single, cohesive framework. By normalizing volatility components against True Range and implementing multi-stage filtering logic, it provides traders with high-probability setup identification and breakout confirmation signals. Whether you're trading breakouts from consolidation, following momentum trends, or identifying exhaustion reversals, this indicator delivers the volatility intelligence needed to make informed trading decisions across all timeframes and market conditions.
The Vortex Volatility Engine is a sophisticated momentum oscillator that combines directional volatility analysis with squeeze detection to identify high-probability trading opportunities. Unlike traditional volatility indicators that simply measure price dispersion, this indicator decomposes volatility into bullish and bearish components, revealing the underlying directional strength of market movements. By integrating True Range normalization, directional momentum filtering, and dynamic volatility bands, it provides traders with a comprehensive framework for detecting volatility compression periods (squeezes) and subsequent explosive breakout signals.
Key Features
- Directional Volatility Decomposition: Separates upward and downward price movements into distinct volatility components, revealing which side of the market controls momentum.
- Squeeze Detection System: Identifies low-volatility consolidation periods by comparing short-term True Range against long-term baselines, signaling potential setup phases for major moves.
- Dynamic Volatility Bands: Adaptive upper and lower bands calculated using standard deviation, creating context-aware thresholds that adjust to changing market conditions.
- Breakout Signal Generation: Automated detection of volatility expansion events when the delta crosses outside dynamic bands during non-squeeze periods.
- Four-Color Momentum Gradient: Visual differentiation between strong/weak bullish and bearish momentum using bright and dim color coding.
- Comprehensive Alert System: Real-time notifications for bullish breakouts, bearish breakouts, squeeze initiation, and squeeze release events.
How It Works
The Vortex Volatility Engine employs a multi-stage calculation methodology that transforms raw price data into actionable volatility intelligence:
Stage 1: True Range Baseline Calculation
The indicator begins by calculating a smoothed True Range using the Running Moving Average (RMA) method over the user-defined lookback period (default 14 bars). True Range captures the maximum of three values: current high-low range, absolute value of high minus previous close, and absolute value of low minus previous close. This provides a comprehensive measure of actual market volatility that accounts for gaps and limit moves.
Stage 2: Directional Volatility Separation
Price changes are decomposed into two distinct components:
- Upward Volatility (up_vol): Captures only positive price changes using math.max(ta.change(close), 0), then smooths with RMA to create an average upward momentum measure.
- Downward Volatility (dn_vol): Captures only negative price changes (converted to positive values) using math.max(-ta.change(close), 0), then smooths with RMA to create an average downward momentum measure.
Stage 3: Power Normalization
Both directional volatility components are normalized against the True Range baseline and converted to a 0-100 scale:
- Bull Power = (up_vol / tr_smooth) × 100
- Bear Power = (dn_vol / tr_smooth) × 100
This normalization ensures that the indicator adapts to different volatility regimes and instruments. Values above 50 indicate bullish dominance, while values below 50 indicate bearish dominance.
Stage 4: Vortex Delta Calculation
The core signal is derived by subtracting Bear Power from Bull Power, creating the Vortex Delta. This delta is then smoothed using a Simple Moving Average (default 5 periods) to reduce noise and prevent false signals. Positive delta values indicate bullish volatility dominance, while negative values indicate bearish dominance.
Stage 5: Squeeze Detection Logic
The indicator compares short-term True Range (using the primary length parameter) against a long-term True Range baseline (3× the primary length). When short-term volatility falls below a user-defined threshold (default 0.8× the long-term average), a squeeze condition is triggered. This identifies consolidation periods where the market is "coiling" before a potential explosive move.
Stage 6: Dynamic Band Construction
Upper and lower volatility bands are constructed using:
- Basis Line: SMA of the Vortex Delta over 2× the primary length
- Standard Deviation: Calculated over the same period
- Upper Band: Basis + (StdDev × Band Multiplier)
- Lower Band: Basis - (StdDev × Band Multiplier)
These bands create adaptive thresholds that expand during high-volatility periods and contract during low-volatility periods, providing context-aware breakout detection.
Trading Ideas and Insights
Breakout Trading Strategy
The primary trading methodology involves waiting for squeeze periods followed by volatility expansion breakouts:
- Identify Squeeze: Watch for gray dots appearing on the zero line, indicating volatility compression.
- Wait for Release: Monitor for the squeeze to fire (gray dots disappear), signaling the end of consolidation.
- Confirm Direction: Enter trades when the Vortex Delta crosses above the upper band (bullish breakout) or below the lower band (bearish breakout) during non-squeeze periods.
- Momentum Confirmation: Prioritize trades where the histogram shows bright colors (strong momentum) rather than dim colors (weak momentum).
Trend Continuation Signals
Use the histogram color gradient to identify trend strength:
- Bright green bars (delta > 0 and increasing) suggest strong bullish momentum continuation
- Dark green bars (delta > 0 but decreasing) suggest weakening bullish momentum, potential reversal warning
- Bright red bars (delta < 0 and decreasing) suggest strong bearish momentum continuation
- Dark red bars (delta < 0 but increasing) suggest weakening bearish momentum, potential reversal warning
Mean Reversion Opportunities
When the Vortex Delta reaches extreme levels outside the dynamic bands but fails to sustain momentum (color shifts from bright to dim), this can signal exhaustion and potential mean reversion back toward the zero line or basis.
How Multiple Indicators Work Together
The Vortex Volatility Engine integrates four distinct analytical components into a unified framework:
1. True Range Foundation
Provides the volatility baseline that normalizes all other calculations, ensuring the indicator adapts to different market conditions and instruments without requiring recalibration.
2. Directional Momentum Decomposition
By separating upward and downward price movements, the indicator reveals which side controls the market. This is superior to simple momentum oscillators that only show net movement, as it exposes the underlying battle between bulls and bears.
3. Squeeze Detection System
The squeeze component acts as a filter and setup identifier. By comparing short-term versus long-term volatility, it identifies periods of compression that historically precede significant directional moves. This prevents traders from taking breakout signals during normal volatility fluctuations.
4. Dynamic Volatility Bands
The standard deviation-based bands provide context-aware thresholds that adapt to changing market regimes. During high-volatility periods, the bands widen to prevent false signals. During low-volatility periods, they contract to capture smaller but significant moves.
Synergistic Integration:
These components work together in a logical sequence: True Range establishes the baseline → Directional decomposition reveals momentum → Squeeze detection identifies setup periods → Dynamic bands define breakout thresholds. Each component enhances the others, creating a robust system that filters noise while capturing genuine volatility expansion events.
Unique Aspects
- Volatility Normalization Method: Unlike standard vortex indicators that use absolute price differences, this engine normalizes directional movements against True Range, creating a percentage-based power metric that works across all timeframes and instruments.
- Four-Tier Color Coding: The histogram uses a sophisticated color gradient that distinguishes not just direction (bullish/bearish) but also momentum strength (accelerating/decelerating), providing instant visual feedback on trend quality.
- Squeeze Filtering Logic: Breakout signals are only generated during non-squeeze periods, preventing false signals during consolidation and ensuring traders only act on genuine volatility expansion events.
- Dual Smoothing Approach: Applies RMA smoothing to directional components and SMA smoothing to the final delta, balancing responsiveness with noise reduction.
- Multi-Timeframe Volatility Analysis: Uses different lookback periods for squeeze detection (3× primary length) versus band calculation (2× primary length), creating a hierarchical volatility framework.
How to Use
Adding to Your Chart
- Add the Vortex Volatility Engine to your chart - it displays in a separate pane below price.
- The histogram shows the Vortex Delta (bullish/bearish volatility balance).
- Gray circular dots on the upper and lower edges represent dynamic volatility bands.
- Gray dots on the zero line indicate squeeze periods (low volatility compression).
- Small colored circles on the histogram mark breakout signals.
Interpreting Signals
- Histogram Above Zero: Bullish volatility dominance - upward price movements are stronger than downward movements.
- Histogram Below Zero: Bearish volatility dominance - downward price movements are stronger than upward movements.
- Bright Green Bars: Strong bullish momentum (delta positive and increasing) - trend continuation likely.
- Dark Green Bars: Weak bullish momentum (delta positive but decreasing) - potential reversal warning.
- Bright Red Bars: Strong bearish momentum (delta negative and decreasing) - downtrend continuation likely.
- Dark Red Bars: Weak bearish momentum (delta negative but increasing) - potential reversal warning.
- Squeeze Dots Present: Market in consolidation, volatility compressed - prepare for potential breakout.
- Bullish Breakout Signal: Delta crosses above upper band during non-squeeze - enter long positions.
- Bearish Breakout Signal: Delta crosses below lower band during non-squeeze - enter short positions.
Setting Up Alerts
- Right-click on the indicator and select "Add Alert"
- Choose from four alert conditions: Bullish Vortex Breakout, Bearish Vortex Breakout, Squeeze Started, Squeeze Fired
- Configure notification preferences (popup, email, webhook, etc.)
- Alerts will trigger automatically when conditions are met, allowing hands-free monitoring
Customization
Volatility Length (Default: 14)
Controls the lookback period for True Range and directional momentum calculations. Lower values (8-10) create a more responsive indicator suitable for intraday trading and volatile markets. Higher values (20-30) produce smoother signals better suited for swing trading and trending markets. Adjust based on your trading timeframe and market conditions.
Signal Smoothing (Default: 5)
Applies final smoothing to the Vortex Delta histogram to reduce noise and prevent whipsaws. Lower values (2-3) maintain responsiveness but may generate more false signals. Higher values (7-10) create cleaner signals but with increased lag. Use lower smoothing for scalping, higher smoothing for position trading.
Squeeze Threshold (Default: 0.8)
Determines how strict the squeeze detection is. Lower values (0.6-0.7) require more significant volatility compression, resulting in fewer but higher-quality squeeze signals. Higher values (0.9-1.0) detect squeezes more frequently but may include less significant consolidations. Adjust based on your preferred trade frequency.
Volatility Band Multiplier (Default: 2.0)
Controls the width of the dynamic volatility bands. Lower values (1.5-1.8) create tighter bands that generate more frequent breakout signals but with higher false positive rates. Higher values (2.5-3.0) create wider bands that filter out noise but may miss smaller breakout opportunities. Optimize based on backtesting results for your specific instrument and timeframe.
Recommended Settings by Trading Style
- Scalping (1-5 min charts): Length: 8, Smoothing: 3, Squeeze: 0.7, Bands: 1.8
- Day Trading (15-60 min charts): Length: 14, Smoothing: 5, Squeeze: 0.8, Bands: 2.0
- Swing Trading (4H-Daily charts): Length: 21, Smoothing: 7, Squeeze: 0.85, Bands: 2.5
Conclusion
The Vortex Volatility Engine represents a comprehensive approach to volatility-based momentum trading by combining directional decomposition, squeeze detection, and adaptive band analysis into a single, cohesive framework. By normalizing volatility components against True Range and implementing multi-stage filtering logic, it provides traders with high-probability setup identification and breakout confirmation signals. Whether you're trading breakouts from consolidation, following momentum trends, or identifying exhaustion reversals, this indicator delivers the volatility intelligence needed to make informed trading decisions across all timeframes and market conditions.
リリースノート
Update name.オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
🚀🚀🚀 Pineify - pineify.app
Essential Toolkit for Every Trader
- AI Pine Script Generator
- Finance AI Agent
- AI Stock Picker
- Pine Script Visual Editor
- Invited indicators
- Strategy Optimizer
- Trading Journal
- Backtest Report
Essential Toolkit for Every Trader
- AI Pine Script Generator
- Finance AI Agent
- AI Stock Picker
- Pine Script Visual Editor
- Invited indicators
- Strategy Optimizer
- Trading Journal
- Backtest Report
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
🚀🚀🚀 Pineify - pineify.app
Essential Toolkit for Every Trader
- AI Pine Script Generator
- Finance AI Agent
- AI Stock Picker
- Pine Script Visual Editor
- Invited indicators
- Strategy Optimizer
- Trading Journal
- Backtest Report
Essential Toolkit for Every Trader
- AI Pine Script Generator
- Finance AI Agent
- AI Stock Picker
- Pine Script Visual Editor
- Invited indicators
- Strategy Optimizer
- Trading Journal
- Backtest Report
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。