pub struct SessionVwapState {
pub vwap: f64,
pub upper_1: f64,
pub lower_1: f64,
pub upper_2: f64,
pub lower_2: f64,
pub upper_3: f64,
pub lower_3: f64,
pub std_dev: f64,
pub cumulative_volume: f64,
pub bar_index: usize,
}Expand description
Output state of the Session VWAP indicator.
Fields§
§vwap: f64Volume Weighted Average Price for the session.
upper_1: f64Upper +1.0 standard deviation band (vwap + 1.0 * std_dev).
lower_1: f64Lower -1.0 standard deviation band (vwap - 1.0 * std_dev).
upper_2: f64Upper +2.0 standard deviation band (vwap + 2.0 * std_dev).
lower_2: f64Lower -2.0 standard deviation band (vwap - 2.0 * std_dev).
upper_3: f64Upper +3.0 standard deviation band (vwap + 3.0 * std_dev).
lower_3: f64Lower -3.0 standard deviation band (vwap - 3.0 * std_dev).
std_dev: f64Session volume-weighted standard deviation: $\sqrt{\frac{\sum V \cdot (TP - VWAP)^2}{\sum V}}$.
cumulative_volume: f64Cumulative volume accumulated in the current session.
bar_index: usize0-indexed count of bars processed in the current session.
Implementations§
Source§impl SessionVwapState
impl SessionVwapState
Sourcepub fn upper(&self, band: SessionVwapBand) -> f64
pub fn upper(&self, band: SessionVwapBand) -> f64
Returns the upper band value for the specified sigma multiplier.
Sourcepub fn lower(&self, band: SessionVwapBand) -> f64
pub fn lower(&self, band: SessionVwapBand) -> f64
Returns the lower band value for the specified sigma multiplier.
Sourcepub fn band(&self, band: SessionVwapBand) -> (f64, f64)
pub fn band(&self, band: SessionVwapBand) -> (f64, f64)
Returns the (upper, lower) band envelope pair for the specified sigma multiplier.
Trait Implementations§
Source§impl Clone for SessionVwapState
impl Clone for SessionVwapState
impl Copy for SessionVwapState
Source§impl Debug for SessionVwapState
impl Debug for SessionVwapState
Source§impl<'de> Deserialize<'de> for SessionVwapState
impl<'de> Deserialize<'de> for SessionVwapState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SessionVwapState
impl PartialEq for SessionVwapState
Source§impl Serialize for SessionVwapState
impl Serialize for SessionVwapState
impl StructuralPartialEq for SessionVwapState
Auto Trait Implementations§
impl Forget for SessionVwapState
impl Freeze for SessionVwapState
impl Move for SessionVwapState
impl RefUnwindSafe for SessionVwapState
impl Send for SessionVwapState
impl Sync for SessionVwapState
impl Unpin for SessionVwapState
impl UnsafeUnpin for SessionVwapState
impl UnwindSafe for SessionVwapState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> Scalar for T
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.