Skip to main content

map_bar

Function map_bar 

Source
pub fn map_bar(
    instrument: &InstrumentId,
    tf: Timeframe,
    b: &Bar,
    now: Instant,
) -> Candle
Expand description

Bar -> core candle. Absent prices and volume become 0. close_ts is computed from the open time and the timeframe (month and longer frames follow the calendar), because the bar carries only the open time.