MarketLab Docs
ScriptingSources

VD

Volume delta source configuration for Market Lab scripts.

VD Source

The vd source provides volume delta candles for backtests and live scripts.

Manifest

export const script = {
  name: "vd-script",
  version: "1",
  sources: ["vd"],
  params: {}
}

Backtest

mlab script backtest ./scripts/vd-summary.js \
  --provider mmt \
  --exchange hyperliquid \
  --symbol HYPE/USDT \
  --from 1780497965372 \
  --to 1780618018000 \
  --source vd:timeframe=3600 \
  --source vd:bucket=1

Input shape:

input.mode === "window"
input.vd.candles
input.vd.bucket
input.vd.timeframe_sec

Live Run

mlab script run ./scripts/vd-summary.js \
  --provider mmt \
  --exchange hyperliquid \
  --symbol HYPE/USDT \
  --source vd:timeframe=3600 \
  --source vd:bucket=1

Live input shape:

input.mode === "stream"
input.source === "vd"
input.vd.candle
input.vd.bucket
input.vd.timeframe_sec

Config

KeyRequiredDescription
timeframeYesVD candle timeframe in seconds.
bucketYesMMT VD bucket, from 1 to 11.

Buckets

MMT buckets VD by trade notional size:

BucketTrade size range
1All trades
2$1 - $1K
3$1K - $10K
4$10K - $25K
5$25K - $50K
6$50K - $100K
7$100K - $250K
8$250K - $500K
9$500K - $1M
10$1M - $5M
11$5M+

See VD Data Type for the candle fields.

On this page