OPEN-SOURCE SCRIPT

CVD Divergence Insights

707
📘 CVD Divergence Insights – by Colicoid

Pine Script v6 | Volume Delta Divergence Oscillator with Spike Detection



🔍 Overview

CVD Divergence Insights is a volume-aware oscillator and divergence spike detector that helps you spot smart money activity, absorption, failed pressure, and hidden strength or weakness — even when price action alone gives little away.

It works by comparing normalized Cumulative Volume Delta (CVD) against normalized price movement, and optionally applying a volume-weighting layer to highlight when aggressive participation is truly behind the divergence. The result is a dynamic visual tool that identifies tension in the market, and helps you trade based on how that tension resolves.



🧠 Core Concept
• When price moves one way and CVD moves another, it reflects imbalance between aggression and result.
• Divergence is not a trigger — it’s a build-up of pressure.
• The real edge lies in the resolution of that pressure.
• Optional volume-weighting helps you ignore noise and focus on high-conviction moves only.



⚙️ How It Works
1. CVD Calculation
CVD is generated using lower-timeframe delta volume (buy vs. sell pressure), accumulated per bar.
2. Oscillator
A normalized divergence between the smoothed CVD and smoothed price.
3. Volume Weighting (optional)
Emphasizes divergences occurring on higher-than-normal volume, deprioritizes low-volume noise.
4. Signal Line (optional)
A short EMA of the oscillator to help track momentum shifts (hidden by default).
5. Divergence Spikes
Statistical spike detection using standard deviation — green/red dots highlight unusually large divergence activity.



🎛️ Inputs

Anchor Period
Higher timeframe where the CVD is accumulated and processed.

Lower Timeframe
Optional override for granularity of buy/sell volume data.

SMA Length
Used for smoothing both price and CVD before divergence is calculated.

Volume Weighted?
Enables adaptive weighting based on relative volume size.

Volume Normalization Length
Lookback period used to define what is “normal” volume.

Divergence Spike Threshold
StdDev-based threshold to detect abnormally large divergences.

Signal Line Length
Controls the EMA smoothing of the optional signal line (hidden by default).



📈 Trade Setup Example: Hidden Bullish Divergence
1. Price forms a higher low, but CVD forms a lower low — hidden bullish divergence.
2. This shows aggressive sellers are trying, but price is resilient — likely absorption.
3. You wait for a "convergent signal bar":
• A bullish candle with strong structure or body
• Confirmed by CVD starting to turn upward
4. That’s your trigger bar — the tension resolves upward.



🤝 Recommended Pairings

For best results, combine CVD Divergence Insights with the companion script:

🔗 Cumulative Volume Delta Line (also by Colicoid)

This lets you:
• See the raw CVD line and its SMA visually
• Spot standard and hidden divergences in price/CVD directly
• Use the Insights indicator to evaluate divergence quality and flag aggressive bull/bear behavior
• Use the same SMA length on both indicators for alignment

👉 Tip: To save screen space, drag the CVD Line indicator into the same panel as CVD Divergence Insights.



🧰 Why Use This?
• ✅ Catch absorption setups and failed pressure zones
• ✅ Filter out low-quality divergences using volume context
• ✅ Understand why price is hesitating or breaking out
• ✅ Add smart confirmation to breakout/reversal trades
• ✅ Align your execution with who’s actually in control



📎 Created by Colicoid

Built in Pine Script v6 for advanced price-volume analysis, with focus on effort vs result, market psychology, and smart money detection.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.