Cumulative Delta Proxy from Volume
Market participants often seek to distinguish between accumulation and distribution by comparing volume on up candles against volume on down candles. On exchanges and timeframes where true volume delta (bid-side versus ask-side volume) is unavailable, a cumulative delta proxy built from directional volume serves as a lower-cost approximation. This indicator sums the difference between up-volume and down-volume across time, revealing net accumulation or liquidation pressure without requiring market microstructure data.
//@version=6
indicator("Cumulative Delta Proxy", overlay=false, timeframe="")
// Inputs
method = input.string("Close-to-Close", "Up/Down Detection", options=["Close-to-Close", "Close-to-Open", "High-Low"])
smooth = input.int(1, "Smoothing (MA)", minval=1, maxval=200)
showZero = input.bool(true, "Show Zero Line")
showMA = input.bool(false, "Show Smoothed MA")
// Volume signal: 1 for up, -1 for down, 0 for neutral
volSignal =
if method == "Close-to-Close"
close > close[1] ? 1 : close < close[1] ? -1 : 0
else if method == "Close-to-Open"
close > open ? 1 : close < open ? -1 : 0
else // High-Low
high > open[1] ? 1 : low < open[1] ? -1 : 0
// Directional volume: up volume minus down volume
dirVol = volSignal * volume
// Cumulative delta proxy
cumDelta = ta.cum(dirVol)
// Smoothing (optional MA)
smoothDelta = ta.sma(cumDelta, smooth)
// Plots
plot(cumDelta, title="Cumulative Delta", color=cumDelta > 0 ? color.new(color.blue, 0) : color.new(color.red, 0), linewidth=1)
plot(showMA ? smoothDelta : na, title="Smoothed Delta", color=color.orange, linewidth=2, style=plot.style_line)
hline(0, "Zero", color=color.gray, linestyle=hline.style_dashed, linewidth=1, display=showZero ? hline.display.all : hline.display.none)
// Background shading for trend
bgcolor(showZero and cumDelta > 0 ? color.new(color.blue, 95) : showZero and cumDelta < 0 ? color.new(color.red, 95) : na)
How the code works
The indicator begins by selecting a method to classify candles as up or down. The "Close-to-Close" approach (most common) compares the current close against the prior close; "Close-to-Open" examines the candle body; "High-Low" tests whether the session high exceeded the prior open. A signal of 1, -1, or 0 is assigned accordingly.
Volume is then multiplied by this signal: up-volume candles contribute positive volume, down-volume candles contribute negative volume, and neutral candles contribute zero. This creates directional volume for each bar.
The ta.cum() function accumulates these directional volumes from the first bar onward, producing a running tally of net volume. Positive cumulative delta indicates net buying pressure; negative indicates selling pressure. The optional smoothing parameter applies a simple moving average to reduce noise, useful on high-frequency timeframes.
The plot displays the raw cumulative delta in blue (positive) or red (negative), with optional zero-line and background shading for visual reference. The smoothed moving average plots as an overlay in orange if enabled.
Reading it on a chart
Cumulative delta proxy rises when up-volume consistently exceeds down-volume and falls when down-volume dominates. A sustained climb during a price uptrend suggests accumulation aligned with price direction; a climb during a downtrend may signal potential reversal as buyers accumulate at lower prices.
Peaks and troughs in the indicator often precede price reversals by several bars, as accumulation or liquidation pressure builds before price responds. Sharp drops in cumulative delta, even during steady price advance, can warn of weakening buying conviction.
Traders using this tool on shorter timeframes (5-minute to hourly) may observe that cumulative delta diverges from price: price makes new highs while the delta oscillates or declines, signaling that volume is concentrating on down-candles. This is a classic bearish divergence pattern, though it does not guarantee immediate reversal.
The smoothed moving average filters intra-session noise and highlights structural shifts in accumulation/liquidation trends. Crossovers between raw and smoothed curves often mark inflection points.
Limitations
This indicator is explicitly a proxy: it uses volume direction as a substitute for true delta (bid-side vs. ask-side volume), which may not be available on all exchanges or timeframes. This substitution introduces material blind spots.
First, volume direction alone does not distinguish between a large limit order (no urgency) and a series of small market orders (high urgency). A single down-candle with very large volume may signal capitulation, but it may also reflect a patient seller's iceberg order sitting at a fixed price. Without order flow data, the indicator cannot discriminate.
Second, on stocks and ETFs with very high trading costs or on low-liquidity assets, volume may cluster on market opens and closes regardless of accumulation intent. Cumulative delta can diverge wildly from equilibrium prices in these regimes.
Third, the indicator repaints only if inputs are changed retroactively (which the code does not do). However, it assumes that directional volume is a reliable proxy for intent. In reality, high-volume down-candles can occur during capitulation (bearish) or panic-driven market-orders during oversold conditions (bullish setup). Context, order size distribution, and price level matter.
Fourth, cumulative indicators are path-dependent: a single large outlier volume bar early in the analysis period biases the entire cumulative sum forward. On long timeframes (daily, weekly), this effect is mild; on 1-minute or tick charts, a single order can skew the entire session's delta.
Finally, no Delta proxy predicts price. Markets may trade on news, geopolitics, Fed action, or market microstructure (e.g., options expiry gamma flows) that overwhelm accumulation signals. Cumulative delta is one lens; it is not a sufficient reason to trade.
Key definitions
Cumulative delta: A running sum of the difference between volume traded on up-candles and volume on down-candles, used to gauge net accumulation or liquidation over time.
Directional volume: Volume assigned a positive or negative sign based on whether the price candle closed above or below a reference level (prior close, open, or high).
Volume delta (true): The difference between the volume of transactions initiated at the ask price (buying pressure) and the volume initiated at the bid price (selling pressure), available on exchanges with full order-book data.
Accumulation: A market phase in which buyers consistently outnumber or outsize sellers, often seen as rising cumulative delta despite stable or declining price.
Divergence: A pattern in which price makes a new high or low while an indicator (like cumulative delta) fails to confirm, often signaling weakening conviction and potential reversal.
Proxy: A substitute measure used when a direct measure is unavailable; cumulative delta from volume is a proxy for true delta when bid/ask volume is not published.
References
[1] Easley, D., de Poor, M. & O'Hara, M., "Microstructure in the Global FX Market", Journal of Finance, vol. 67, no. 2, pp. 753-792 (2012). Available via doi.org.
[2] CME Group, "Volume and Open Interest", CME Education (accessed 2025). Available at https://www.cmegroup.com/education/courses.html (CME Group education portal).
[3] Investopedia, "Volume", Investopedia Investing Dictionary (2024). Available at https://www.investopedia.com/terms/v/volume.asp.
[4] FINRA, "Trade Reporting and Compliance Engine (TRACE)", FINRA Rulebook (2024). Available at https://www.finra.org/rules-guidance/rules/4530 (bond market transparency rule).
[5] Wikipedia, "Technical Analysis, Volume", Wikipedia (2025). Available at https://en.wikipedia.org/wiki/Technical_analysis#Volume.
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-09-20. Educational research on historical data, not financial advice.
Keep reading
Order Block Zones with Objective Displacement Rules
Free open-source Pine Script indicator: order block zones with objective displacement rules. Full code and a plain-English walkthrough.
Volume Climax Detector (Z-Score)
Free open-source Pine Script indicator: volume climax detector (volume z-score). Full code and a plain-English walkthrough.
RSI Divergence Flagger with Strict Pivot Rules
Free open-source Pine Script indicator: RSI divergence flagger with strict pivot rules. Full code and a plain-English walkthrough.