Skip to main content

find_session_breaks

Function find_session_breaks 

Source
pub fn find_session_breaks(
    bars: &[Bar],
    provider: &dyn SessionProvider,
) -> Vec<(usize, SessionBreak)>
Expand description

Scan a bar slice for session breaks.

Returns a Vec of (bar_index, SessionBreak) pairs indicating where each break falls. The bar_index is the index of the bar after the break (i.e., the first bar of the new session).