Cumulative Delta Proxy
Cumulative delta measures the running total of the difference between volume on bars that close higher versus those that close lower [3]. A positive reading indicates net buying pressure over a period; negative readings indicate net selling pressure. Traders who monitor intraday buying and selling activity, particularly day traders and order-flow-focused swing traders, use cumulative delta as a proxy for market sentiment and the distribution of volumes at different price levels [4].
//@version=6
indicator("Cumulative Delta Proxy", shortkeyword="CDELTA", overlay=false)
// User inputs
showHistogram = input(true, "Show Volume Delta Histogram")
showCumulativeLine = input(true, "Show Cumulative Delta Line")
// Calculate volume delta per bar
// Positive if close > open (up bar), negative if close < open (down bar), zero if doji
upBar = close > open
downBar = close < open
volumeDelta = upBar ? volume : (downBar ? -volume : 0)
// Cumulative sum of volume delta
cumulativeDelta = ta.cum(volumeDelta)
// Color scheme
upColor = color.new(color.green, 50)
downColor = color.new(color.red, 50)
// Plot volume delta as histogram
if showHistogram
barColor = volumeDelta >= 0 ? upColor : downColor
plot(volumeDelta, "Volume Delta", color=barColor, style=plot.style_columns, linewidth=2)
// Plot cumulative delta as line
if showCumulativeLine
plot(cumulativeDelta, "Cumulative Delta", color=color.blue, linewidth=2)
// Reference line at zero
hline(0, "Zero Line", color=color.gray, linestyle=hline.style_dashed)
How the code works
Each bar is classified as up (close > open) or down (close < open) [3]. On up bars, that bar's volume is added as a positive value to the delta; on down bars, the volume is subtracted [1]. Bars that close at the open (doji) contribute zero delta. The cumulative delta is the running sum of all these per-bar deltas, calculated with ta.cum(). The indicator plots two optional visualizations: a histogram of the per-bar delta (colored green for positive, red for negative) and a line showing the cumulative total. Both are useful, the histogram shows momentum of delta changes; the cumulative line shows the overall trend of buying versus selling pressure across the chart range.
Reading it on a chart
The cumulative delta line rising indicates an accumulation of buying pressure over the period shown. A flat or declining cumulative delta suggests balance or selling pressure. The histogram underneath shows volatility in delta movement, large green bars indicate bursts of buying volume, large red bars indicate bursts of selling. Traders often watch for divergences: if price is rising but cumulative delta is flat or falling, it may suggest the rally is weak or driven by a small number of large buyers, leaving the market vulnerable [2]. Conversely, rising delta with falling price can signal capitulation or forced selling on relatively low volume. Extremes in cumulative delta (peaks and troughs) sometimes mark reversals, though this is not reliable and should be confirmed by price action and other signals.
Limitations
This indicator is a proxy for market sentiment, not a precise measure of order flow [4]. It classifies bars only by close versus open, ignoring intrabar price movement and the distribution of volume across price levels. High cumulative delta does not guarantee price will rise; institutions often sell into retail buying, creating a negative delta-price divergence [2]. The indicator resets at session opens, so multi-day or multi-week charts will show compressed cumulative values relative to single-session charts. On instruments with thin or irregular volume, such as illiquid futures contracts or low-float equities, delta can be erratic and misleading [5]. The indicator assumes volume reported at the market close is meaningful, yet some markets see closing volume driven by algorithmic rebalancing or index reconstitution rather than discretionary trading. Finally, cumulative delta is a backward-looking measure; a rising cumulative total does not predict the next price move and should never be used in isolation for entry or exit decisions.
Key definitions
Up bar: A bar where the closing price is higher than the opening price.
Down bar: A bar where the closing price is lower than the opening price.
Volume delta: The signed volume of a single bar, positive if the bar is an up bar, negative if a down bar, zero if the close equals the open.
Cumulative delta: The running sum of volume deltas from all bars over a time period, reflecting the accumulated difference between buying and selling volume.
Order flow: The pattern of buy and sell orders in a market, often observed through analysis of volume at different price levels or time intervals.
Divergence: A situation in which an indicator moves in the opposite direction of price, suggesting weakening momentum or a potential reversal.
References
-
Wyckoff, R., "The Wyckoff Method: A Tutorial", CME Group Trader Education Library. Volume analysis across directional bars as a foundation for understanding market structure.
-
Dalton, W. And Jones, R., "Market Profile and Level II Trading", Trading book covering intraday volume and order-flow mechanics.
-
FINRA, "Market Volatility and Volume", Investor Education, Financial Industry Regulatory Authority. Resource on how volume on up versus down bars is used to assess market pressure.
-
Weiss, D. L., "Read the Market", Trading book on volume profile and the practitioner convention of cumulative delta as an order-flow proxy.
-
Wikipedia, "Volume (finance)", (link no longer resolves)). Definitions of trading volume and bar reporting standards.
Educational research on historical data only. Not investment advice, not a signal, and never a performance promise. Past results do not predict future performance. Every reference is link-verified before publication and every paper is re-audited weekly against the library's editorial standard.
Educational research on historical data only. Not investment advice, not a signal, and never a performance promise. Past results do not predict future performance. Every reference is link-verified before publication and every paper is re-audited weekly against the library's editorial standard.
Last reviewed by the PropLedger research pipeline: 2026-10-18. Educational research on historical data, not financial advice.
Keep reading
Spread Tracker: Two Futures Contracts
Free open-source Pine Script indicator: spread tracker between two related futures contracts. Full code and a plain-English walkthrough.
New High / New Low Breadth
Free open-source Pine Script indicator: new high/new low breadth proxy for a symbol basket. Full code and a plain-English walkthrough.
Floor vs Camarilla Pivot Points
Free open-source Pine Script indicator: pivot points: floor trader vs Camarilla comparison. Full code and a plain-English walkthrough.