pub struct EquityGainTargetRule {
pub target_pct: Decimal,
pub initial_equity: Decimal,
}Expand description
Triggers a breach when equity has grown by more than target_pct from its initial value.
Useful as an automated profit-target alert: once equity has gained X%, the monitor signals the rule so the caller can decide whether to reduce risk or lock in gains.
Fields§
§target_pct: DecimalThe profit-target percentage gain from initial_equity (e.g. dec!(20) = 20%).
initial_equity: DecimalThe equity at the time this rule was created.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EquityGainTargetRule
impl RefUnwindSafe for EquityGainTargetRule
impl Send for EquityGainTargetRule
impl Sync for EquityGainTargetRule
impl Unpin for EquityGainTargetRule
impl UnsafeUnpin for EquityGainTargetRule
impl UnwindSafe for EquityGainTargetRule
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