OPEN-SOURCE SCRIPT
Volume Delta Oscillator with Divergence Signals [BigBeluga]

🔵 OVERVIEW
🔵 HOW IT WORKS
🔵 HOW TO USE
🔵 NOTES
Volume Delta Oscillator with Divergence Signals [BigBeluga] is an oscillator that approximates net buying and selling pressure from each candle's body and plots it three ways — as a raw delta histogram, a smoothed oscillator line, and a signal line. It brings delta-style analysis to any symbol by deriving pressure from price action, then automatically detecting bullish and bearish divergences between delta and price.
🔵 HOW IT WORKS
The indicator estimates buying/selling pressure, smooths it into an oscillator, and scans for pivots to detect divergences:
1 — Volume Delta Approximation
- Body Ratio: Measures the candle body size as a fraction of its full high-low range.
- Delta Estimate: Assigns positive volume when the candle closes up and negative when it closes down, scaled by the body ratio.
- Normalization: Delta is clamped to a [–50, +50] range so readings stay consistent across assets and timeframes.
2 — Oscillator & Signal
- Raw Delta Histogram: Plots the normalized delta per bar as columns, colored by sign and strength.
- Oscillator Line: An EMA over the Volume Delta Lookback produces the main smoothed delta line, drawn with a soft shadow for depth.
- Signal Line: A yellow WMA over the Signal Smoothing Length rides on top of the oscillator as a faster reference for crossovers.
- Stabilized Range: The Stabilize Oscillator Range toggle auto-scales the EMA so the oscillator keeps a consistent visual range regardless of the lookback period.
- Overbought / Oversold Zones: Shaded bands above +50 and below –50 highlight stretched conditions.
3 — Divergence Detection
- Pivot Scan: Uses Pivot Left/Right Lookback to detect oscillator pivots and compare each to the previous one.
- Bullish Divergence: Oscillator makes a higher low while price makes a lower low.
- Bearish Divergence: Oscillator makes a lower high while price makes a higher high.
- Divergence Lines: Drawn directly on the oscillator connecting the two pivots.
4 — Price Level Tracking
- Active Levels: Each divergence projects a horizontal price level onto the main chart from the pivot price.
- Live Extension: Uncrossed levels extend bar by bar until price trades through them.
- Locked History: Crossed levels freeze in place as dashed lines, keeping a visual record of past reactions.
- Capacity Cap: Only the most recent 5 uncrossed levels are kept to avoid clutter.
🔵 HOW TO USE
Beyond reading delta pressure, the indicator can be applied in several ways:
- Gauge Buy/Sell Pressure: Use the histogram color and height to see whether buyers or sellers dominate the current bar.
- Spot Overbought / Oversold: Watch for the oscillator pushing into the shaded zones above +50 or below –50.
- Trade Divergences: Enter in the direction of the "Bull" or "Bear" label when the oscillator diverges from price.
- Use Projected Price Levels: Treat active divergence levels as support or resistance until price crosses them.
- Confirm with the Signal Line: Use signal line crossovers as short-term momentum confirmation.
- Adjust Label Size: Use Divergence Label Size to match the labels to your chart's scale.
- Toggle the View: Turn individual divergence features on or off to reduce clutter on the oscillator and chart.
🔵 NOTES
Why this implementation is unique:
- Estimates volume delta directly from candle bodies, so it works on any symbol without extra data feeds.
- Plots three layers — raw histogram, smoothed oscillator line, and signal line — for a layered read on pressure.
- Auto-stabilizes the oscillator range across different lookback periods using the Stabilize Oscillator Range toggle.
- Combines oscillator divergences with projected price levels that extend in real time until crossed.
- Locks crossed levels as dashed history so past divergence reactions stay visible on the chart.
- Fully customizable colors, pivots, label size, and display toggles to match any chart theme.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
🌐 bigbeluga.org/tv - Get access to our powerful tools & indicators.
🔵 Learn More -> docs.bigbeluga.org/
🔵 Join Discord -> go.bigbeluga.org/k65q9bfqfu
All content provided by BigBeluga is for educational purposes only
🔵 Learn More -> docs.bigbeluga.org/
🔵 Join Discord -> go.bigbeluga.org/k65q9bfqfu
All content provided by BigBeluga is for educational purposes only
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
🌐 bigbeluga.org/tv - Get access to our powerful tools & indicators.
🔵 Learn More -> docs.bigbeluga.org/
🔵 Join Discord -> go.bigbeluga.org/k65q9bfqfu
All content provided by BigBeluga is for educational purposes only
🔵 Learn More -> docs.bigbeluga.org/
🔵 Join Discord -> go.bigbeluga.org/k65q9bfqfu
All content provided by BigBeluga is for educational purposes only
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。