pub enum TaRiskRule {
RsiExtreme {
lower: f64,
upper: f64,
},
AtrSurge {
threshold_pct: f64,
},
BollingerBreakout {
sigma_multiplier: f64,
},
}Expand description
Technical-analysis-based risk rule definitions.
Variants§
RsiExtreme
Block opening new positions when RSI is outside the safe range.
Fields
AtrSurge
Warn / reduce position when ATR as a percentage of price exceeds threshold.
BollingerBreakout
Block trading when price is outside Bollinger Bands by the given sigma multiplier.
Trait Implementations§
Source§impl Clone for TaRiskRule
impl Clone for TaRiskRule
Source§fn clone(&self) -> TaRiskRule
fn clone(&self) -> TaRiskRule
Returns a duplicate of the value. Read more
1.0.0 · 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 TaRiskRule
impl Debug for TaRiskRule
Source§impl<'de> Deserialize<'de> for TaRiskRule
impl<'de> Deserialize<'de> for TaRiskRule
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TaRiskRule
impl RefUnwindSafe for TaRiskRule
impl Send for TaRiskRule
impl Sync for TaRiskRule
impl Unpin for TaRiskRule
impl UnsafeUnpin for TaRiskRule
impl UnwindSafe for TaRiskRule
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