OPEN-SOURCE SCRIPT

Cumulative Volume Delta Profile and Heatmap [BackQuant]

480
Cumulative Volume Delta Profile and Heatmap [BackQuant]
A multi-view CVD workstation that measures buying vs selling pressure, renders a price-aligned CVD profile with Point of Control, paints an optional heatmap of delta intensity, and detects classical CVD divergences using pivot logic. Built for reading who is in control, where participation clustered, and when effort is failing to produce result.

What is CVD
Cumulative Volume Delta accumulates the difference between aggressive buys and aggressive sells over time. When CVD rises, buyers are lifting the offer more than sellers are hitting the bid. When CVD falls, the opposite is true. Plotting CVD alongside price helps you judge whether price moves are supported by real participation or are running on fumes.

Core Features
Visual Analysis Components
  • CVD Columns - Plot of cumulative delta, colored by side, for quick read of participation bias.
  • CVD Profile - Price-aligned histogram of CVD accumulation using user-set bins. Shows where net initiative clustered.
  • Split Buy and Sell CVD - Optional two-sided profile that separates positive and negative CVD into distinct wings.
  • POC - Point of Control - The price level with the highest absolute CVD accumulation, labeled and line-marked.
  • Heatmap - Semi-transparent blocks behind price that encode CVD intensity across the last N bars.
  • Divergence Engine - Pivot-based detection of Bearish and Bullish CVD divergences with optional lines and labels.
  • Stats Panel - Top level metrics: Total CVD, Buy and Sell totals with percentages, Delta Ratio, and current POC price.


How it works
Delta source and sampling
  • You select an Anchor Timeframe that defines the higher time aggregation for reading the trend of CVD.
  • The script pulls lower timeframe volume delta and aggregates it to the anchor window. You can let it auto-select the lower timeframe or force a custom one.
  • CVD is then accumulated bar by bar to form a running total. This plot shows the direction and persistence of initiative.


Profile construction
  • The recent price range is split into Profile Granularity bins.
  • As price traverses a bin, the current delta contribution is added to that bin.
  • If Split Buy and Sell CVD is enabled, positive CVD goes to the right wing and negative CVD to the left wing.
  • Widths are scaled by each side’s maximum so you can compare distribution shape at a glance.
  • The Point of Control is the bin with the highest absolute CVD. This marks where initiative concentrated the most.


Heatmap
  • For each bin, the script computes intensity as absolute CVD relative to the maximum bin value.
  • Color is derived from the side in control in that bin and shaded by intensity.
  • Heatmap Length sets how far back the panels extend, highlighting recurring participation zones.


Divergence model
  • You define pivot sensitivity with Pivot Left and Right.
  • Bearish divergence triggers when price confirms a higher high while CVD fails to make a higher high within a configurable Delta Tolerance.
  • Bullish divergence triggers when price confirms a lower low while CVD fails to make a lower low.
  • On trigger, optional link lines and labels are drawn at the pivots for immediate context.


Key Settings
Delta Source
  • Anchor Timeframe - Higher TF for the CVD narrative.
  • Custom Lower TF and Lower Timeframe - Force the sampling TF if desired.


Pivot Logic
  • Pivot Left and Right - Bars to each side for swing confirmation.
  • Delta Tolerance - Small allowance to avoid near-miss false positives.


CVD Profile
  • Show CVD Profile - Toggle profile rendering.
  • Split Buy and Sell CVD - Two-sided profile for clearer side attribution.
  • Show Heatmap - Project intensity panels behind price.
  • Show POC and POC Color - Mark the dominant CVD node.
  • Profile Granularity - Number of bins across the visible price range.
  • Profile Offset and Profile Width - Position and scale the profile.
  • Profile Position - Right, Left, or Current bar alignment.


Visuals
  • Bullish Div Color and Bearish Div Color - Colors for divergence artifacts.
  • Show Divergence Lines and Labels - Visualize pivots and annotations.
  • Plot CVD - Column plot of total CVD.
  • Show Statistics and Position - Toggle and place the summary table.


Reading the display
CVD columns
  • Rising CVD confirms buyers are in control. Falling CVD confirms sellers.
  • Flat or choppy CVD during wide price moves hints at passive or exhausted participation.


CVD profile wings
  • Thick right wing near a price zone implies heavy buy initiative accumulated there.
  • Thick left wing implies heavy sell initiative.
  • POC marks the strongest initiative node. Expect reactions on first touch and rotations around this level when the tape is balanced.


Heatmap
  • Brighter blocks indicate stronger historical net initiative at that price.
  • Stacked bright bands form CVD high volume nodes. These often behave like magnets or shelves for future trade.


Divergences
  • Bearish - Price prints a higher high while CVD fails to do so. Effort is not producing result. Potential fade or pause.
  • Bullish - Price prints a lower low while CVD fails to do so. Capitulation lacks initiative. Potential bounce or reversal.


Stats panel
  • Total CVD - Net initiative over the window.
  • Buy and Sell volume with percentages - Side composition.
  • Delta Ratio - Buy over Sell. Values above 1 favor buyers, below 1 favor sellers.
  • POC Price - Current control node for plan and risk.


Workflows
Trend following
  • Choose an Anchor Timeframe that matches your holding period.
  • Trade in the direction of CVD slope while price holds above a bullish POC or below a bearish POC.
  • Use pullbacks to CVD nodes on your profile as entry locations.
  • Trend weakens when price makes new highs but CVD stalls, or new lows while CVD recovers.


Mean reversion
  • Look for divergences at or near prior CVD nodes, especially the POC.
  • Fade tests into thick wings when the side that dominated there now fails to push CVD further.
  • Target rotations back toward the POC or the opposite wing edge.


Liquidity and execution map
  • Treat strong wings and heatmap bands as probable passive interest zones.
  • Expect pauses, partial fills, or flips at these shelves.
  • Stops make sense beyond the far edge of the active wing supporting your idea.


Alerts included
  • CVD Bearish Divergence and CVD Bullish Divergence.
  • Price Cross Above POC and Price Cross Below POC.
  • Extreme Buy Imbalance and Extreme Sell Imbalance from Delta Ratio.
  • CVD Turn Bullish and CVD Turn Bearish when net CVD crosses zero.
  • Price Near POC proximity alert.


Best practices
  • Use a higher Anchor Timeframe to stabilize the CVD story and a sensible Profile Granularity so wings are readable without clutter.
  • Keep Split mode on when you want to separate initiative attribution. Turn it off when you prefer a single net profile.
  • Tune Pivot Left and Right by instrument to avoid overfitting. Larger values find swing divergences. Smaller values find micro fades.
  • If volume is thin or synthetic for the symbol, CVD will be less reliable. The script will warn if volume is zero.


Trading applications
  • Context - Confirm or question breakouts with CVD slope.
  • Location - Build entries at CVD nodes and POC.
  • Timing - Use divergence and POC crosses for triggers.
  • Risk - Place stops beyond the opposite wing or outside the POC shelf.


Important notes and limits
  • This is a price and volume based study. It does not access off-book or venue-level order flow.
  • CVD profiles are built from the data available on your chart and the chosen lower timeframe sampling.
  • Like all volume tools, readings can distort during roll periods, holidays, or feed anomalies. Validate on your instrument.


Technical notes
  • Delta is aggregated from a lower timeframe into an Anchor Timeframe narrative.
  • Profile bins update in real time. Splitting by side scales each wing independently so both are readable in the same panel.
  • Divergences are confirmed using standard pivot definitions with user-set tolerances.
  • All profile drawing uses fixed X offsets so panels and POC do not swim when you scroll.


Quick start
  • Anchor Timeframe = Daily for intraday context.
  • Split Buy and Sell CVD = On.
  • Profile Granularity = 100 to 200, Profile Position = Right, Width to taste.
  • Pivot Left and Right around 8 to 12 to start, then adapt.
  • Turn on Heatmap for a fast map of interest bands.


Bottom line
CVD tells you who is doing the lifting. The profile shows where they did it. Divergences tell you when effort stops paying. Put them together and you get a clear read on control, location, and timing for both trend and mean reversion.

면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.