pub struct TdRiskLevelOutput {
pub buy_risk: f64,
pub sell_risk: f64,
}Expand description
Output of TdRiskLevel: the latest buy- and sell-side protective
stop levels derived from the most-recently-completed setup in each
direction. Either field is f64::NAN until the first setup in that
direction completes.
Fields§
§buy_risk: f64Protective-stop level for a long position taken on a completed
buy setup. NAN until the first buy setup completes.
The two levels are established independently, so one can be a real price
while the other is still NAN. update withholds the output entirely
(None) until at least one of them exists, so a returned value always
carries at least one level. NAN is the encoding because the C ABI
mirrors this struct as two plain doubles.
sell_risk: f64Protective-stop level for a short position taken on a completed
sell setup. NAN until the first sell setup completes.
See Self::buy_risk for when a level can be NAN.
Trait Implementations§
Source§impl Clone for TdRiskLevelOutput
impl Clone for TdRiskLevelOutput
Source§fn clone(&self) -> TdRiskLevelOutput
fn clone(&self) -> TdRiskLevelOutput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TdRiskLevelOutput
Source§impl Debug for TdRiskLevelOutput
impl Debug for TdRiskLevelOutput
Source§impl PartialEq for TdRiskLevelOutput
impl PartialEq for TdRiskLevelOutput
impl StructuralPartialEq for TdRiskLevelOutput
Auto Trait Implementations§
impl Freeze for TdRiskLevelOutput
impl RefUnwindSafe for TdRiskLevelOutput
impl Send for TdRiskLevelOutput
impl Sync for TdRiskLevelOutput
impl Unpin for TdRiskLevelOutput
impl UnsafeUnpin for TdRiskLevelOutput
impl UnwindSafe for TdRiskLevelOutput
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,
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