OPEN-SOURCE SCRIPT
Volume Oscillator

Description
The Volume Oscillator measures the momentum of trading volume by calculating the percentage difference between a fast and a slow Simple Moving Average (SMA) of daily volume. It helps traders identify periods of increasing or decreasing market participation, often signaling potential trend strength or exhaustion.
Key Features:
Adaptive to Trading Session:
Automatically adjusts SMA periods based on the actual trading session length (default: 8.5 hours for FTSEMIB, customizable for any market — e.g., 6.5h for US stocks, 24h for crypto).
Fast & Slow SMAs:
Compares a short-term SMA (default 10 days) with a longer-term SMA (default 25 days) of volume.
Oscillator Formula:
100 × (Fast SMA / Slow SMA - 1)
→ Positive values = increasing volume momentum (bullish)
→ Negative values = decreasing volume momentum (bearish)
Signal Line (optional):
A moving average of the oscillator (default 7 days) for smoother trend identification and crossover signals.
Overbought/Oversold Levels:
User-defined horizontal lines (default +40 / -40) to highlight extreme volume conditions.
Customizable Colors:
Change the oscillator and signal line colors to match your chart style.
How to Interpret:
Bullish Conditions:
Oscillator crosses above the zero line
Oscillator crosses above the signal line
Readings near or above +40 may indicate strong buying pressure (watch for possible exhaustion if too extreme)
Bearish Conditions:
Oscillator crosses below the zero line
Oscillator crosses below the signal line
Readings near or below -40 may indicate selling pressure or capitulation
Divergences:
Look for divergences between price and the Volume Oscillator (e.g., price makes new highs but oscillator fails to confirm with higher highs) — a classic sign of weakening momentum.
Best Use Cases:
Indices (FTSEMIB, DAX, CAC, SPX, etc.), stocks and futures with defined trading hours, crypto (set session duration to 24 hours).
Works well on intraday (e.g., 15m, 30m, 1h) and daily charts.
Customization Tips:
- Shorten fast/slow lengths for faster signals (more noise)
- Lengthen them for smoother, longer-term analysis
- Adjust session duration for non-standard market hours
- Enable/disable the signal line in the settings
Note: Volume data quality can vary by symbol and exchange. Always combine this indicator with price action and other tools. Use proper risk management.
The Volume Oscillator measures the momentum of trading volume by calculating the percentage difference between a fast and a slow Simple Moving Average (SMA) of daily volume. It helps traders identify periods of increasing or decreasing market participation, often signaling potential trend strength or exhaustion.
Key Features:
Adaptive to Trading Session:
Automatically adjusts SMA periods based on the actual trading session length (default: 8.5 hours for FTSEMIB, customizable for any market — e.g., 6.5h for US stocks, 24h for crypto).
Fast & Slow SMAs:
Compares a short-term SMA (default 10 days) with a longer-term SMA (default 25 days) of volume.
Oscillator Formula:
100 × (Fast SMA / Slow SMA - 1)
→ Positive values = increasing volume momentum (bullish)
→ Negative values = decreasing volume momentum (bearish)
Signal Line (optional):
A moving average of the oscillator (default 7 days) for smoother trend identification and crossover signals.
Overbought/Oversold Levels:
User-defined horizontal lines (default +40 / -40) to highlight extreme volume conditions.
Customizable Colors:
Change the oscillator and signal line colors to match your chart style.
How to Interpret:
Bullish Conditions:
Oscillator crosses above the zero line
Oscillator crosses above the signal line
Readings near or above +40 may indicate strong buying pressure (watch for possible exhaustion if too extreme)
Bearish Conditions:
Oscillator crosses below the zero line
Oscillator crosses below the signal line
Readings near or below -40 may indicate selling pressure or capitulation
Divergences:
Look for divergences between price and the Volume Oscillator (e.g., price makes new highs but oscillator fails to confirm with higher highs) — a classic sign of weakening momentum.
Best Use Cases:
Indices (FTSEMIB, DAX, CAC, SPX, etc.), stocks and futures with defined trading hours, crypto (set session duration to 24 hours).
Works well on intraday (e.g., 15m, 30m, 1h) and daily charts.
Customization Tips:
- Shorten fast/slow lengths for faster signals (more noise)
- Lengthen them for smoother, longer-term analysis
- Adjust session duration for non-standard market hours
- Enable/disable the signal line in the settings
Note: Volume data quality can vary by symbol and exchange. Always combine this indicator with price action and other tools. Use proper risk management.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.