pub struct VolumeProfileOutput {
pub price_low: f64,
pub price_high: f64,
pub bins: Vec<f64>,
}Expand description
Volume Profile output: the price domain plus the per-bin volume histogram.
bins[i] holds the volume attributed to the price bucket
[price_low + i * w, price_low + (i + 1) * w) where
w = (price_high - price_low) / bins.len(). The histogram sums to the total
volume in the rolling window (within floating-point tolerance).
Fields§
§price_low: f64Lowest price in the window — the lower edge of bin 0.
price_high: f64Highest price in the window — the upper edge of the last bin.
bins: Vec<f64>Per-bin volume, lowest price bucket first. Length equals bin_count.
Trait Implementations§
Source§impl Clone for VolumeProfileOutput
impl Clone for VolumeProfileOutput
Source§fn clone(&self) -> VolumeProfileOutput
fn clone(&self) -> VolumeProfileOutput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VolumeProfileOutput
impl Debug for VolumeProfileOutput
Source§impl PartialEq for VolumeProfileOutput
impl PartialEq for VolumeProfileOutput
Source§fn eq(&self, other: &VolumeProfileOutput) -> bool
fn eq(&self, other: &VolumeProfileOutput) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VolumeProfileOutput
Auto Trait Implementations§
impl Freeze for VolumeProfileOutput
impl RefUnwindSafe for VolumeProfileOutput
impl Send for VolumeProfileOutput
impl Sync for VolumeProfileOutput
impl Unpin for VolumeProfileOutput
impl UnsafeUnpin for VolumeProfileOutput
impl UnwindSafe for VolumeProfileOutput
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<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