OPEN-SOURCE SCRIPT

Volume Delta Oscillator with Divergence Signals [BigBeluga]

2 486
🔵 OVERVIEW
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:

  1. Gauge Buy/Sell Pressure: Use the histogram color and height to see whether buyers or sellers dominate the current bar.
  2. Spot Overbought / Oversold: Watch for the oscillator pushing into the shaded zones above +50 or below –50.
  3. Trade Divergences: Enter in the direction of the "Bull" or "Bear" label when the oscillator diverges from price.
  4. Use Projected Price Levels: Treat active divergence levels as support or resistance until price crosses them.
  5. Confirm with the Signal Line: Use signal line crossovers as short-term momentum confirmation.
  6. Adjust Label Size: Use Divergence Label Size to match the labels to your chart's scale.
  7. 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.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.