pub struct RiskDefaults {
pub category: String,
pub sl_type: SlType,
pub sl_mult: f64,
pub tp_mult: f64,
pub trailing: bool,
pub trailing_mult: f64,
}Expand description
Per-category risk defaults for SL, TP, and trailing-stop parameters.
Fields§
§category: String§sl_type: SlType§sl_mult: f64Multiplier applied to ATR (or percentage value for Percent type).
tp_mult: f64Take-profit multiplier (ATR multiples or percentage).
trailing: boolWhether trailing stop is enabled for this category.
trailing_mult: f64Trailing-stop ATR multiplier (only meaningful when trailing == true).
Trait Implementations§
Source§impl Clone for RiskDefaults
impl Clone for RiskDefaults
Source§fn clone(&self) -> RiskDefaults
fn clone(&self) -> RiskDefaults
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 RiskDefaults
impl Debug for RiskDefaults
Source§impl<'de> Deserialize<'de> for RiskDefaults
impl<'de> Deserialize<'de> for RiskDefaults
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 RiskDefaults
impl RefUnwindSafe for RiskDefaults
impl Send for RiskDefaults
impl Sync for RiskDefaults
impl Unpin for RiskDefaults
impl UnsafeUnpin for RiskDefaults
impl UnwindSafe for RiskDefaults
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