pub struct Bar {}Expand description
Represents a single bar/candle of market data
Fields§
§open: f64§high: f64§low: f64§close: f64§volume: f64§index: u64§time: i64The bar’s opening time as a UNIX timestamp in milliseconds, exposed to
scripts as the time variable.
is_first: boolBarstate flags the host supplies, exposed to scripts as barstate.*.
The first bar of the dataset (barstate.isfirst).
is_last: boolThe last bar of the dataset (barstate.islast).
is_new: boolA new bar has just opened (barstate.isnew).
is_confirmed: boolThe bar is closed/confirmed (barstate.isconfirmed).
is_history: boolA historical bar (barstate.ishistory).
is_realtime: boolA real-time bar (barstate.isrealtime).
is_last_confirmed_history: boolThe last historical bar before real-time (barstate.islastconfirmedhistory).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Bar
impl RefUnwindSafe for Bar
impl Send for Bar
impl Sync for Bar
impl Unpin for Bar
impl UnsafeUnpin for Bar
impl UnwindSafe for Bar
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more