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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.