order-flow data boundary

Cumulative Volume Delta on thinkorswim

Cumulative volume delta normally accumulates buyer-initiated volume minus seller-initiated volume. A valid implementation needs a defensible way to classify traded volume by side.

Source review completed

Prompt brief

ThinkScript · one source file

Review in thinkorswim

Example request

Create a lower thinkorswim study named Cumulative Directional Volume Proxy. For each completed regular-session bar, add volume when close exceeds open, subtract it when close is below open, and add zero for a doji. Reset at the regular-session start and label this as a price-direction proxy.

Editable sourceFocused revisionsCheck in native editor

Direct answer

Standard thinkScript bar volume is not, by itself, a historical bid-ask aggressor split. A script that assigns all volume on an up bar to buying and all volume on a down bar to selling is a price-direction proxy, not true trade-classified CVD. Label such approximations plainly and do not compare them as equivalent to an order-flow data product.

What to know first

  • CVD depends on how each trade or volume unit is classified.
  • Up-bar versus down-bar volume is an approximation with different information.
  • A custom script cannot recover fields that the available data does not expose.

Reference points

Keep the calculation explicit

Trade-classified delta
Buyer-initiated activity minus seller-initiated activity under a stated classification method.
Bar-direction proxy
Assigns volume from the bar price change. It uses price direction rather than trade-side classification.
Cumulative series
Adds the selected per-bar delta over time and therefore needs an explicit reset rule.
Reset
Defines whether accumulation restarts by session, date, visible chart, or another stated boundary.

Start with the data, not the plot shape

Two lines can look like CVD while using different classifications. Before interpreting divergence, identify whether the input is bid-ask trade data, uptick and downtick classification, or a bar-direction proxy.

The standard volume function returns volume for the selected symbol and aggregation. It does not document a historical buyer-versus-seller split in that value.

A bounded thinkScript approximation

If a price-direction proxy is acceptable, state the rule, neutral-bar behavior, and reset. Name the plot accordingly, such as cumulative directional-volume proxy, instead of presenting it as exact order-flow delta.

Pineify can encode that transparent approximation and its display. It cannot add unavailable market data to thinkorswim or verify equivalence with another vendor's order-flow feed.

  • Document the classification rule in the study description.
  • Expose the reset boundary as an input where practical.
  • Do not use proxy agreement as evidence of trade-level accuracy.

A directional proxy can disagree with trade delta

Imagine a bar that closes above its open with total volume of 1,000. A close-versus-open proxy assigns +1,000. If hypothetical trade classification instead contains 400 buyer-initiated and 600 seller-initiated units, trade delta is -200. The same rising bar can therefore produce opposite signs. Neither number identifies traders as institutions.

The volume function accepts LAST, ASK, BID, and MARK price types, with documented restrictions for non-Forex symbols. Those parameter names alone do not establish a complete historical aggressor-classified feed. Verify the field's meaning and coverage before calling its difference true CVD.

Pineify thinkScript workflow

Need a custom extension after checking the built-in option?

Use Pineify when the official study or platform feature does not cover a clearly defined calculation, display, or alert. The agent returns one editable study or strategy file for native review.

Open the thinkScript agent

Sources and scope

Last verified:

Pineify provides information and code-generation assistance, not investment advice. Generated scripts, strategy reports, simulations, and historical examples cannot predict prices or guarantee returns. Review every script and test it in its target platform before relying on its output.

Frequently asked questions

Does thinkorswim have true cumulative volume delta in thinkScript?

Standard bar volume alone does not supply a historical aggressor-side split. A script based on up and down bars is a proxy unless it uses a documented trade-classified data source.

Is CumulativeVolumeIndex the same as cumulative volume delta?

No. The built-in CumulativeVolumeIndex accumulates advancing-stock volume minus declining-stock volume for the selected exchange. That breadth calculation differs from an individual instrument's trade-classified delta.

Can Pineify generate a CVD proxy?

Yes, if the classification and reset are explicit. The page and source should label it as an approximation rather than true bid-ask delta.

Continue in the thinkScript coding workspace

Generate one editable thinkScript study or strategy, inspect the source, request focused changes, and complete the final check in thinkorswim.

Pineify generates source code. Review its syntax and chart behavior in thinkorswim before use.