MMTMMT Docs
Data Sources

Cumulative Volume Delta

Cumulative volume delta candles.

Legacy Scripting v2

These docs remain available while the v2 engine is supported. For new scripts, use Scripting v3.

data.CVD exposes cumulative volume delta candles. Each bar is derived from prior cumulative close plus the current VD bar.

data.CVD supports aggregated exchange strings and trade-size buckets.

const cvd = subscribe(data.CVD, { bucket: 1 })

Functions

cvd.open(offset?) -> number
cvd.high(offset?) -> number
cvd.low(offset?) -> number
cvd.close(offset?) -> number
cvd.unix(offset?) -> number
cvd.bucket() -> number
cvd.bucketInfo() -> { id: number, label: string, minValue: number, maxValue: number }
  • offset?: optional bar offset on the CVD subscription clock

Bucket Selection

Use options.bucket or options.bucketGroup with subscribe(...) to choose which stored VD bucket the cumulative series is derived from.

const cvdAll = subscribe(data.CVD, { bucket: 1 })
const cvdWhales = subscribe(data.CVD, { bucket: 10 })

bucket() and bucketInfo() expose the active bucket metadata on the CVD accessor.

Example

//@version=2
indicator("CVD", false)
const cvd = subscribe(data.CVD, {
  exchange: agg("bybitf", "binancef"),
  bucket: 3
})

function onBar(index) {
  plot("CVD Close", cvd.close(), { color: color.orange })
}

On this page