Skip to main content

resample_by_count

Function resample_by_count 

Source
pub fn resample_by_count(
    candles: &[Candle],
    count: usize,
) -> Result<Vec<Candle>>
Expand description

Resample candles into fixed groups of count (e.g. five 1-minute bars into one 5-minute bar). A trailing partial group is aggregated as-is. count must be non-zero.