MarketLab Docs
ScriptingSources

Volumes

Volume profile source configuration for Market Lab scripts.

Volumes Source

The volumes source provides buy/sell volume profile data at price levels.

Manifest

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

Backtest

mlab script backtest ./scripts/volume-profile-script.js \
  --provider mmt \
  --exchange binancef \
  --symbol BTC/USDT \
  --from 1704067200000 \
  --to 1704070800000 \
  --source volumes:timeframe=60

Backtest input shape:

input.mode === "window"
input.volumes.profiles
input.volumes.timeframe_sec

Live Run

mlab script run ./scripts/volume-profile-script.js \
  --provider mmt \
  --exchange binancef \
  --symbol BTC/USDT \
  --source volumes:timeframe=60

Live input shape:

input.mode === "stream"
input.source === "volumes"
input.volumes.profile
input.volumes.timeframe_sec

Config

KeyRequiredDescription
timeframeYesVolume profile timeframe in seconds. Example: 60, 300, 3600.

See Volumes Data Type for the profile fields.

On this page