pub struct ZigZagOutput {
pub swing: f64,
pub direction: f64,
}Expand description
ZigZag output: the price of the bar that completed the most recent swing
and its direction (+1.0 for a high swing, -1.0 for a low swing).
The price is the high of the bar at which the high-swing was anchored, or the low of the bar at which the low-swing was anchored — i.e. the actual extreme that the swing turns from, not the bar that triggered confirmation.
Fields§
§swing: f64Price of the confirmed swing extreme.
direction: f64Direction: +1.0 if the swing is a high, -1.0 if a low.
Trait Implementations§
Source§impl Clone for ZigZagOutput
impl Clone for ZigZagOutput
Source§fn clone(&self) -> ZigZagOutput
fn clone(&self) -> ZigZagOutput
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 ZigZagOutput
impl Debug for ZigZagOutput
Source§impl PartialEq for ZigZagOutput
impl PartialEq for ZigZagOutput
Source§fn eq(&self, other: &ZigZagOutput) -> bool
fn eq(&self, other: &ZigZagOutput) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ZigZagOutput
impl StructuralPartialEq for ZigZagOutput
Auto Trait Implementations§
impl Freeze for ZigZagOutput
impl RefUnwindSafe for ZigZagOutput
impl Send for ZigZagOutput
impl Sync for ZigZagOutput
impl Unpin for ZigZagOutput
impl UnsafeUnpin for ZigZagOutput
impl UnwindSafe for ZigZagOutput
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