pub struct FootprintBar {
pub time: DateTime<Utc>,
pub levels: BTreeMap<i64, FootprintLevel>,
pub bid: f64,
pub ask: f64,
pub unknown: f64,
pub min_delta: f64,
pub max_delta: f64,
}Expand description
One bar’s executed volume and intrabar delta path, starting at zero.
Fields§
§time: DateTime<Utc>Bar open, obtained from the supplied BarClock.
levels: BTreeMap<i64, FootprintLevel>Traded levels in ascending price order; empty prices allocate nothing.
bid: f64Total sell aggressor volume.
ask: f64Total buy aggressor volume.
unknown: f64Total unclassified volume.
min_delta: f64Minimum running delta, including the initial zero.
max_delta: f64Maximum running delta, including the initial zero.
Implementations§
Source§impl FootprintBar
impl FootprintBar
Sourcepub fn delta_percent(&self) -> Option<f64>
pub fn delta_percent(&self) -> Option<f64>
Delta as a percentage of all executed volume; undefined for zero volume.
Sourcepub fn value_area(&self, share: f64) -> Option<(i64, i64)>
pub fn value_area(&self, share: f64) -> Option<(i64, i64)>
Contiguous value area grown from the POC toward the larger adjacent volume.
Ties add one row on each side. share is clamped to 0..=1, NaN to zero.
Gaps hold zero volume.
Returns inclusive lower and upper level keys; a zero-volume bar has no area.
Sourcepub fn imbalance(
&self,
level: i64,
ratio: f64,
diagonal: bool,
min_volume: f64,
) -> (bool, bool)
pub fn imbalance( &self, level: i64, ratio: f64, diagonal: bool, min_volume: f64, ) -> (bool, bool)
(bid, ask) dominance at level, comparing horizontally or to the adjacent price.
Missing adjacent prices and the outer diagonals do not signal an imbalance.
A positive side against a zero opposite side is imbalanced. The dominant side needs at
least min_volume, inclusive and with the ratio’s rounding tolerance; zero keeps every
ratio signal. Ratios below 1, negative minima or non-finite values produce no signals.
Trait Implementations§
Source§impl Clone for FootprintBar
impl Clone for FootprintBar
Source§fn clone(&self) -> FootprintBar
fn clone(&self) -> FootprintBar
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FootprintBar
impl Debug for FootprintBar
Source§impl PartialEq for FootprintBar
impl PartialEq for FootprintBar
impl StructuralPartialEq for FootprintBar
Auto Trait Implementations§
impl Freeze for FootprintBar
impl RefUnwindSafe for FootprintBar
impl Send for FootprintBar
impl Sync for FootprintBar
impl Unpin for FootprintBar
impl UnsafeUnpin for FootprintBar
impl UnwindSafe for FootprintBar
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
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> ⓘ
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> ⓘ
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