OPEN-SOURCE SCRIPT
Volatility Compression Oscillator [JOAT]

Volatility Compression Oscillator [JOAT]
Introduction
Volatility Compression Oscillator [JOAT] is a two-line momentum oscillator that measures where price is trading inside a dynamic volatility envelope, then tracks the compression and release of that positioning through line crosses, histogram rotation, and divergence. It is designed to show when price is quietly loading pressure, when that pressure starts to expand, and when expansion may be exhausting.
This script is useful for traders who want more than a standard bounded oscillator. It combines normalized price location, dual smoothing, histogram analysis, and divergence into one compact pane.

Why This Indicator Exists
Core Components Explained
1. Dynamic Volatility Envelope
Pine Script®
The script centers the envelope around the candle midpoint average, then expands it with both average range and average body contribution. This makes the oscillator adaptive to both volatility and candle conviction.
2. Normalized Oscillator Calculation
Pine Script®
Price is transformed into a centered oscillator that measures whether price is trading in the upper or lower half of the active volatility envelope.
3. Dual-Smoothing Engine
The raw oscillator is processed through fast and slow smoothing chains. Their relationship drives the main trend reading:
4. Signal Layers
The indicator produces several distinct signal families:
5. Chart Cleanliness Controls
Divergence lines are retained with an internal cap so the script does not keep drawing indefinitely. This keeps the pane readable and reduces object-limit risk on long-running charts.
Visual Elements
Input Parameters
How to Use This Indicator
Step 1: Determine whether fast is above or below slow.
Step 2: Watch the histogram for acceleration or decay.
Step 3: Use MA crosses for timing only when they occur in sensible zones.
Step 4: Treat OB/OS signals as context for stretch, not automatic reversal commands.
Step 5: Respect divergences most when they align with histogram exhaustion.
Best Practices
Indicator Limitations
Technical Implementation
Built in Pine Script v6 using:
Originality Statement
This indicator is original in how it frames volatility compression and release through normalized envelope location, dual-line momentum, histogram exhaustion, and divergence management in one pane. Its value comes from synthesis and signal layering rather than from any single oscillator component alone.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Oscillator signals can fail, especially in volatile or trendless conditions. Always use proper risk management and independent judgment.
-Made with passion by officialjackofalltrades
Introduction
Volatility Compression Oscillator [JOAT] is a two-line momentum oscillator that measures where price is trading inside a dynamic volatility envelope, then tracks the compression and release of that positioning through line crosses, histogram rotation, and divergence. It is designed to show when price is quietly loading pressure, when that pressure starts to expand, and when expansion may be exhausting.
This script is useful for traders who want more than a standard bounded oscillator. It combines normalized price location, dual smoothing, histogram analysis, and divergence into one compact pane.
Why This Indicator Exists
- Adaptive Normalization: Measures price against a volatility-sensitive envelope instead of a fixed formula
- Two-Speed Momentum Read: Uses fast and slow lines to reveal early shifts in pressure
- Compression / Release Logic: The histogram shows whether momentum is accelerating or fading
- Exhaustion Markers: Histogram peaks and troughs help spot unstable extensions
- Divergence Layer: Tracks when price makes a new swing but oscillator pressure does not confirm
Core Components Explained
1. Dynamic Volatility Envelope
The script centers the envelope around the candle midpoint average, then expands it with both average range and average body contribution. This makes the oscillator adaptive to both volatility and candle conviction.
2. Normalized Oscillator Calculation
Price is transformed into a centered oscillator that measures whether price is trading in the upper or lower half of the active volatility envelope.
3. Dual-Smoothing Engine
The raw oscillator is processed through fast and slow smoothing chains. Their relationship drives the main trend reading:
- Fast above slow = bullish pressure
- Fast below slow = bearish pressure
- Histogram expanding = pressure increasing
- Histogram fading = pressure weakening
4. Signal Layers
The indicator produces several distinct signal families:
- MA Cross Signals: Momentum handoff between fast and slow lines
- OB/OS Crosses: Stretch events when Line 1 crosses the thresholds
- Histogram Peaks / Troughs: Local exhaustion cues
- Divergences: Price making a stronger swing while oscillator pressure weakens
5. Chart Cleanliness Controls
Divergence lines are retained with an internal cap so the script does not keep drawing indefinitely. This keeps the pane readable and reduces object-limit risk on long-running charts.
Visual Elements
- Histogram Columns: Momentum spread between fast and slow lines
- Fast Line: Main directional pressure line
- Slow Line: Reference trend line
- Zero Fill: Directional fill from Line 1 to the centerline
- OB/OS Background: Soft shading in stretch conditions
- Signal Markers: Circles, triangles, diamonds, and squares for different event types
- Dashboard: Trend, line values, histogram value, regime, and divergence state
Input Parameters
- Volatility Window: Lookback for midpoint, body, and range normalization
- Band Scale %: Width multiplier for the adaptive envelope
- OB / OS Levels: Stretch boundaries for Line 1
- Line 1 / Line 2 Smoothing: Controls responsiveness of the dual-line engine
- Pivot Length: Sensitivity for divergence and histogram turning points
- Histogram Peak Levels: Defines stronger exhaustion zones
How to Use This Indicator
Step 1: Determine whether fast is above or below slow.
Step 2: Watch the histogram for acceleration or decay.
Step 3: Use MA crosses for timing only when they occur in sensible zones.
Step 4: Treat OB/OS signals as context for stretch, not automatic reversal commands.
Step 5: Respect divergences most when they align with histogram exhaustion.
Best Practices
- Use higher pivot lengths when markets are noisy
- Treat histogram turns near extremes as better-quality warnings
- Use line crosses in the direction of the higher-timeframe trend
- Avoid overreacting to every divergence in strong trends
- Keep marker display on only if you actively trade the signal layer
Indicator Limitations
- Oscillators can stay overbought or oversold in strong trends
- Divergences are warning signs, not standalone trade systems
- Short smoothing lengths will create more noise
- Compression readings can fail to expand immediately
- Signal quality depends heavily on market structure and instrument behavior
Technical Implementation
Built in Pine Script v6 using:
- Adaptive volatility-band normalization
- Dual-smoothed oscillator lines
- Histogram spread calculation
- Pivot-based divergence detection
- Object-retention caps for divergence lines
- Confirmed-bar signal logic
Originality Statement
This indicator is original in how it frames volatility compression and release through normalized envelope location, dual-line momentum, histogram exhaustion, and divergence management in one pane. Its value comes from synthesis and signal layering rather than from any single oscillator component alone.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Oscillator signals can fail, especially in volatile or trendless conditions. Always use proper risk management and independent judgment.
-Made with passion by officialjackofalltrades
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
The AI Trading Ecosystem, Built to win trades 📈
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
The AI Trading Ecosystem, Built to win trades 📈
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.