HS CVD + Divergence

It was split from the HS Plotter GEX indicator to stay under Pine Script's 64-plot limit. Use both together for the full picture — GEX levels + options flow on the main chart, CVD + divergences in a separate pane below.
How to Read It
The indicator lives in its own pane (below the price chart). There are four visual layers:
Delta Bars (candles) Green candles = net buying pressure on that bar. Red candles = net selling pressure. The taller the candle, the more aggressive the directional volume. Think of these as "who's in control right now" on a bar-by-bar basis.
CVD Line (cyan) The running total of all delta bars. When CVD is rising, buyers are accumulating over time. When CVD is falling, sellers are distributing. The slope matters more than the absolute value — a flattening CVD after a strong trend = momentum fading.
CVD EMA (faded cyan) A smoothed version of the CVD line (default 14 periods). When CVD crosses above its EMA, buying momentum is accelerating. When it crosses below, selling momentum is picking up. The gap between CVD and its EMA shows conviction.
Divergence Labels ("DIV")
Green "DIV" label at bottom = Bullish divergence — price made a new low but CVD is holding higher. Smart money is accumulating while price drops. Look for long entries.
Red "DIV" label at top = Bearish divergence — price made a new high but CVD is fading. Distribution is happening under the surface. Look for short entries or exits.
Background tints green/red on divergence bars so you don't miss them.
Quick Read Guide
What You See What It Means Action
Green delta bars + CVD rising Buyers in control Favor longs, hold runners
Red delta bars + CVD falling Sellers in control Favor shorts, tighten stops
CVD rising but price flat Stealth accumulation Watch for breakout
CVD falling but price flat Stealth distribution Watch for breakdown
Green DIV label Bullish divergence Look for long entry at support
Red DIV label Bearish divergence Look for short entry at resistance
CVD crosses above EMA Buying momentum accelerating Bullish confirmation
CVD crosses below EMA Selling momentum accelerating Bearish confirmation
Settings
Smooth Length (default 14) — EMA period for the CVD smoothing. Lower = more responsive, higher = less noise.
Divergence Lookback (default 10) — How many bars to scan for new highs/lows. Lower catches faster divergences, higher catches bigger ones.
Toggle each layer on/off independently: CVD line, CVD EMA, delta bars, divergences.
Custom colors for CVD line, buy delta, and sell delta.
Alerts
"Bullish CVD Divergence" — fires when price makes a new low but CVD holds. Accumulation signal.
"Bearish CVD Divergence" — fires when price makes a new high but CVD fades. Distribution signal.
Best Used With
Pair this with the HS Plotter GEX indicator on the main chart. When a CVD divergence fires AT a GEX level (King Node, Flip, or OI wall), the signal is significantly stronger. For example: bearish CVD divergence at the Ceiling level = high-probability short setup.
Requirements: Works on any symbol with volume data. If you see a "No volume data" error, the symbol doesn't report volume (some indices, forex pairs).
Skrip hanya-undangan
Hanya pengguna yang disetujui oleh penulis yang dapat mengakses skrip ini. Anda perlu meminta dan mendapatkan izin untuk menggunakannya. Izin ini biasanya diberikan setelah pembayaran. Untuk detail selengkapnya, ikuti petunjuk penulis di bawah ini atau hubungi Mr-Anubis secara langsung.
TradingView TIDAK menyarankan untuk membayar atau menggunakan skrip kecuali Anda sepenuhnya mempercayai pembuatnya dan memahami cara kerjanya. Anda juga dapat menemukan alternatif yang gratis dan sumber terbuka di skrip komunitas kami.
Instruksi penulis
Pernyataan Penyangkalan
Skrip hanya-undangan
Hanya pengguna yang disetujui oleh penulis yang dapat mengakses skrip ini. Anda perlu meminta dan mendapatkan izin untuk menggunakannya. Izin ini biasanya diberikan setelah pembayaran. Untuk detail selengkapnya, ikuti petunjuk penulis di bawah ini atau hubungi Mr-Anubis secara langsung.
TradingView TIDAK menyarankan untuk membayar atau menggunakan skrip kecuali Anda sepenuhnya mempercayai pembuatnya dan memahami cara kerjanya. Anda juga dapat menemukan alternatif yang gratis dan sumber terbuka di skrip komunitas kami.