#[non_exhaustive]pub struct StrategyExcursion {
pub adverse: f64,
pub favourable: f64,
}Expand description
Largest unrealised loss and gain relative to a trade’s entry, before fees.
Both are nonnegative price movements times quantity, for a linear contract with unit point value. They need conversion for other contracts or currencies. Entry and exit fills participate. Source highs and lows participate from the bar containing entry through bars opening strictly before exit; open trades use all remaining bars. At intrabar fills these are whole-bar estimates: OHLC cannot distinguish movement before entry or after exit. Time bars end after their interval (calendar months for monthly bars); execution bars end at the next source open, with the final bar assumed to cover the run’s remaining fills. Use fills at bar boundaries for exact spans.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.adverse: f64Maximum adverse excursion, as a positive loss magnitude.
favourable: f64Maximum favourable excursion, as a positive gain magnitude.
Trait Implementations§
Source§impl Clone for StrategyExcursion
impl Clone for StrategyExcursion
Source§fn clone(&self) -> StrategyExcursion
fn clone(&self) -> StrategyExcursion
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 StrategyExcursion
impl Debug for StrategyExcursion
Source§impl PartialEq for StrategyExcursion
impl PartialEq for StrategyExcursion
impl StructuralPartialEq for StrategyExcursion
Auto Trait Implementations§
impl Freeze for StrategyExcursion
impl RefUnwindSafe for StrategyExcursion
impl Send for StrategyExcursion
impl Sync for StrategyExcursion
impl Unpin for StrategyExcursion
impl UnsafeUnpin for StrategyExcursion
impl UnwindSafe for StrategyExcursion
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