What it measures
Every bar is broken into its finest available sub-bars. Each sub-bar’s volume is booked to buy if that sub-bar closed above the previous one and to sell if below; an unchanged tick inherits the last non-flat direction. That is the tick rule (Lee-Ready-style), and the difference between the two totals is the bar’s delta.
The running total is drawn as candles: open is the total at bar start, close is the total after this bar, so the body is this bar’s delta and the wicks are the intrabar high and low of the running total. One series, one scale.
What it is not
It is not order flow. Pine Script has no bid/ask-tagged trade data at any subscription tier — OHLCV is the entire data model — so no Pine script can see which side a trade actually executed against. This one infers side from price direction. Finer sub-bars get closer; nothing in Pine gets there.
Two consequences worth stating plainly:
- The reading has a confidence number, and it is on screen. The dashboard’s
coveragerow reports how much of the bar’s real volume the sub-bar pull actually classified. Under 60% means the chosen lower timeframe is too coarse for that symbol’s tick rate and the delta is weaker than its precision looks. Slightly over 100% is normal and benign — sub-bar volume aggregates do not always sum to the chart bar’s own figure to the contract. - Missing data reads as missing, not as zero. TradingView caps how far back
intrabar history goes, and at 1-second resolution that window is short. Past
it the plot breaks and the dashboard says
MISSING. It does not draw a flat line, which would be indistinguishable from a genuine absence of net flow. The previous build did exactly that, and it was the main reason for this release.
Reading it
Above or below zero is not bull or bear. The cumulative total resets each session, so its level is net aggressor volume since that reset and its zero-crossing is an artifact of where the reset landed. What carries information is the slope — is it still accumulating? — and divergence against price: price makes a higher high while delta makes a lower high, and the buying that would justify the new high is not there. Those divergences are marked automatically.
The divergence marks are unmeasured. They are the standard reading of cumulative delta and they are why the script is worth publishing, but no hit rate has been established for them on any instrument, and none is claimed here. A pivot is also not confirmed until the bars to its right exist, so every mark appears a few bars after the fact — that lag is structural, not a setting.
Using it in a strategy
Seven series are exported and selectable from another script via
input.source(). One constraint governs all of them: intrabar requests
recalculate on every realtime tick, so the live bar’s delta moves until that
bar closes. Anything gating entries on it must read the confirmed value —
reference the export at [1], or gate on barstate.isconfirmed. Reading the
live value will backtest beautifully and behave differently in real time.
Status
Draft. It compiles clean against the TradingView v6 compiler and its logic is reviewed, but it has not yet been run on a live chart or checked against TradingView’s own built-in volume delta. No performance figure is attached to it because it takes no positions and has none.