Skip to main content

ib_bar_to_nautilus_bar

Function ib_bar_to_nautilus_bar 

Source
pub fn ib_bar_to_nautilus_bar(
    ib_bar: &Bar,
    bar_type: BarType,
    price_precision: u8,
    size_precision: u8,
) -> Result<Bar>
Expand description

Convert IB Bar to Nautilus Bar.

§Arguments

  • ib_bar - The IB historical bar
  • bar_type - The Nautilus bar type
  • price_precision - Price precision for the instrument
  • size_precision - Size precision for the instrument

§Errors

Returns an error if conversion fails.