pub struct RangeBar {
pub open: f64,
pub high: f64,
pub low: f64,
pub close: f64,
pub volume: f64,
pub start_time: DateTime<Utc>,
pub end_time: DateTime<Utc>,
pub range_size: f64,
pub tick_cnt: usize,
}Expand description
A single range bar with fixed price range and variable time span.
Fields§
§open: f64Open price
high: f64High price
low: f64Low price
close: f64Close price
volume: f64Total volume
start_time: DateTime<Utc>Ts when bar started
end_time: DateTime<Utc>Ts when bar completed
range_size: f64Range size used for this bar
tick_cnt: usizeNumber of ticks in this bar
Implementations§
Source§impl RangeBar
impl RangeBar
Sourcepub fn is_bullish(&self) -> bool
pub fn is_bullish(&self) -> bool
Check if this is a bullish (up) bar
Sourcepub fn is_bearish(&self) -> bool
pub fn is_bearish(&self) -> bool
Check if this is a bearish (down) bar
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RangeBar
impl RefUnwindSafe for RangeBar
impl Send for RangeBar
impl Sync for RangeBar
impl Unpin for RangeBar
impl UnsafeUnpin for RangeBar
impl UnwindSafe for RangeBar
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more