Skip to main content

Module resample

Module resample 

Source
Expand description

Higher-timeframe candle resampling.

Aggregates base-timeframe candles into a higher-timeframe (HTF) series using standard OHLCV rules:

  • Open = first constituent bar’s open
  • High = max of constituent highs
  • Low = min of constituent lows
  • Close = last constituent bar’s close
  • Volume = sum of constituent volumes
  • Timestamp = last constituent bar’s timestamp (marks bar completion)

Functions§

base_to_htf_index
Map each base-timeframe index to the most recently completed HTF bar index.
resample
Resample candles from their base timeframe to interval.