Function: resampleOhlc()
ts
function resampleOhlc(
time,
ohlc,
bucketMs,
volume?): ResampledOhlc;Defined in: finance/transforms.ts:240
Roll bars up to a coarser timeframe — 1m candles into 1h, daily into weekly. Buckets are aligned to multiples of bucketMs from the epoch, so the same input always produces the same boundaries. Empty buckets are skipped rather than filled, which is what a market calendar wants.
Parameters
| Parameter | Type |
|---|---|
time | ArrayLike<number> |
ohlc | Ohlc |
bucketMs | number |
volume? | ArrayLike<number> |