OPEN-SOURCE SCRIPT
Cumulative Volume Delta (SB-1) 2.0

📈 Cumulative Volume Delta (CVD) — Stair-Step + Threshold Alerts
🔍 Overview
This Cumulative Volume Delta (CVD) tool visualizes aggressive buying and selling pressure in the market by plotting candlestick-style bars based on volume delta. It helps traders understand which side — buyers or sellers — is exerting more control on lower timeframes and highlights momentum shifts through stair-step patterns and delta threshold breaks. Resets to zero at EOD
Ideal for futures traders, scalpers, and intraday strategists looking for orderflow-based confirmation.
🧠 What Is CVD?
CVD (Cumulative Volume Delta) measures the difference between market buys and sells over a specific timeframe. When the delta is rising, it suggests buyers are being more aggressive. Falling delta suggests seller dominance.
This script aggregates volume delta from a lower timeframe and plots it in a higher timeframe context, allowing you to track microstructure shifts within larger candles.
📊 Features
✅ CVD Candlesticks
Each bar represents volume delta as an OHLC-style candle using:
Open: Delta at the start of the bar
High/Low: Peak delta range
Close: Final delta value at bar close
Teal candles = Net buying pressure
Red candles = Net selling pressure
✅ Threshold Levels (Key Visual Zones)
The script includes horizontal dashed lines at:
+5,000 and +10,000 → Signify strong buying pressure
-5,000 and -10,000 → Signify strong selling pressure
0 line → Neutrality line (no net pressure)
These levels act as volume-based support/resistance zones and breakout confirmation tools. For example:
A CVD cross above +5,000 shows buyers taking control
A CVD cross above +10,000 implies strong bullish momentum
A CVD cross below -5,000 or -10,000 signals intense selling pressure
📈 Stair-Step Pattern Detection
Detects two specific volume-based continuation setups:
Bullish Stair-Step: Both the high and low of the CVD candle are higher than the previous candle
Bearish Stair-Step: Both the high and low of the CVD candle are lower than the previous candle
These patterns often appear during trending moves and serve as confirmation of strength or continuation.
Visual markers:
🟢 Green triangles below bars = Bullish stair-step
🔴 Red triangles above bars = Bearish stair-step
🔔 Alert Conditions
Get real-time alerts when:
Bullish Stair-Step is detected
Bearish Stair-Step is detected
CVD crosses above +5,000
CVD crosses below -5,000
📢 Alerts only trigger on crossover, not every time CVD remains above or below. This avoids repetitive notifications.
⚙️ Inputs & Customization
Anchor Timeframe: The higher timeframe to which CVD data is applied (default: 1D)
Lower Timeframe: The timeframe used to calculate the CVD delta (default: 5 minutes)
Optional Override: Use custom timeframe toggle to force your own micro timeframe
📌 How to Use This CVD Indicator (Step-by-Step Guide)
✅ 1. Confirm Bias Using the Zero Line
The zero line (0 CVD) represents neutral pressure — neither buyers nor sellers are dominating.
Use it as your first filter:
🔼 If CVD is above 0 and rising → Buyer control
🔽 If CVD is below 0 and falling → Seller control
🧠 Tip: CVD rising while price is consolidating may signal hidden buyer interest.
✅ 2. Watch for Crosses of Key Levels: +5,000 and +10,000
These levels act as momentum thresholds:
Level Signal Type What It Means
+5,000 Buyer breakout Buyers are starting to dominate
+10,000 Strong bull bias Strong institutional or algorithmic buying flow
-5,000 Seller breakout Sellers are taking control
-10,000 Strong bear bias Heavy selling pressure is entering the market
Wait for CVD to cross above +5K or below -5K to confirm the active side.
Use these crossovers as entry triggers, breakout confirmations, or trade filters.
🔔 Alerts fire only when the level is first crossed, not every bar above/below.
✅ 3. Use Stair-Step Patterns for Continuation Confirmation
The indicator shows stair-step patterns using triangle signals:
🟢 Green triangle below bar = Bullish stair-step
Suggests a higher high and higher low in delta → buyers stepping up
🔴 Red triangle above bar = Bearish stair-step
Suggests lower highs and lower lows in delta → selling pressure building
Use stair-step signals:
To confirm a continuation of trend
As an entry or add-on signal
Especially after a threshold breakout
🧠 Example: If CVD breaks above +5K and forms bullish stairs → confirms strong trend, ideal for momentum entries.
✅ 4. Combine with Price Action or Structure
CVD works best when used with price, not in isolation. For example:
📉 Price makes a new low but CVD doesn’t → potential bullish divergence
📈 CVD surges while price lags → buyers are absorbing, breakout likely
Use it with:
VWAP
Orderblocks
Liquidity sweeps
Break of market structure/MSS/BOS
✅ 5.
Set Anchor Timeframe = Daily
Set Lower Timeframe = 5 minutes (default)
This lets you:
See intraday flow inside daily bars
Confirm whether a daily candle is being built on net buying or selling
🧠 You’re essentially seeing intra-bar aggression within a bigger time structure.
🧭 Example Trading Setup
Bullish Scenario:
CVD is rising and above 0
CVD crosses above +5,000 → alert fires
Green stair-step appears
Price breaks local resistance or liquidity sweep completes
✅ Consider long entry with structure and CVD alignment
🎯 Place stops below last stair-step or structural low
📌 Final Notes
This tool does not repaint and is designed to work in real-time across all futures, crypto, and equity instruments that support volume data. If your symbol does not provide volume, the script will notify you.
Use it in confluence with VWAP, liquidity zones, or structure breaks for high-confidence trades.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.