Examples
Real command examples for sources, studies, and strategies.
Examples
This page focuses on the commands people will actually run first:
sourcestudystrategy runstrategy backtest
All examples below assume:
--provider mmt- millisecond timestamps at the CLI boundary
- current provider support limited to MMT
Sources
Orderbook snapshot
mlab source orderbook \
--provider mmt \
--exchange bybitf \
--symbol BTC/USDT \
--depth 100 \
--output terminalOrderbook stream
mlab source orderbook \
--provider mmt \
--exchange bybitf \
--symbol BTC/USDT \
--depth 100 \
--stream \
--min-size 0.1 \
--price-group 1 \
--interval-ms 1000 \
--buffer-size 20 \
--output terminalCandles range
mlab source candles \
--provider mmt \
--exchange binancef \
--symbol BTC/USDT \
--timeframe 60 \
--from 1779880000000 \
--to 1779883600000 \
--output jsonCandles stream
mlab source candles \
--provider mmt \
--exchange binancef \
--symbol BTC/USDT \
--timeframe 60 \
--stream \
--output jsonlVD range
mlab source vd \
--provider mmt \
--exchange bybitf \
--symbol BTC/USDT \
--timeframe 60 \
--from 1779620400000 \
--to 1779624000000 \
--bucket 1 \
--output jsonVD stream
mlab source vd \
--provider mmt \
--exchange bybitf \
--symbol BTC/USDT \
--timeframe 60 \
--bucket 1 \
--stream \
--output jsonlStudies
Custom candle window study
mlab study run ./studies/buy-pressure.js \
--provider mmt \
--exchange bybitf \
--symbol BTC/USDT \
--timeframe 60 \
--from 1704067200000 \
--to 1704067800000 \
--input min_vbuy=50000 \
--output jsonSpread
mlab study spread \
--provider mmt \
--exchange bybitf \
--symbol BTC/USDT \
--depth 20 \
--output jsonDepth
mlab study depth \
--provider mmt \
--exchange bybitf \
--symbol BTC/USDT \
--levels 20 \
--output jsonImbalance
mlab study imbalance \
--provider mmt \
--exchange bybitf \
--symbol BTC/USDT \
--depth 50 \
--output jsonSlippage
mlab study slippage \
--provider mmt \
--exchange bybitf \
--symbol BTC/USDT \
--side buy \
--notional 100000 \
--depth 100 \
--output jsonVAMP
mlab study vamp \
--provider mmt \
--exchange bybitf \
--symbol BTC/USDT \
--depth 100 \
--dollar-depth 250000 \
--output jsonCVD
mlab study cvd \
--provider mmt \
--exchange bybitf \
--symbol BTC/USDT \
--timeframe 3600 \
--from 1779620400000 \
--to 1779624000000 \
--bucket 1 \
--output jsonStrategy Run
Live SMA crossover
mlab strategy run sma-crossover \
--provider mmt \
--exchange bybitf \
--symbol BTC/USDT \
--timeframe 60 \
--output terminalLive SMA crossover with warmup anchor
mlab strategy run sma-crossover \
--provider mmt \
--exchange bybitf \
--symbol BTC/USDT \
--timeframe 60 \
--from 1779887295785 \
--output jsonlStrategy Backtest
Historical SMA crossover
mlab strategy backtest sma-crossover \
--provider mmt \
--exchange bybitf \
--symbol BTC/USDT \
--timeframe 60 \
--from 1779660000000 \
--to 1779705600000 \
--fast 20 \
--slow 50 \
--confirm-bars 1 \
--output terminalHistorical SMA crossover JSON
mlab strategy backtest sma-crossover \
--provider mmt \
--exchange bybitf \
--symbol BTC/USDT \
--timeframe 60 \
--from 1779660000000 \
--to 1779705600000 \
--fast 20 \
--slow 50 \
--output json