pub struct ScalePlan {
pub entries: Vec<ScaleInStep>,
pub exits: Vec<ScaleOutStep>,
}Fields§
§entries: Vec<ScaleInStep>§exits: Vec<ScaleOutStep>Implementations§
Source§impl ScalePlan
impl ScalePlan
Sourcepub fn triggered_entries(
&self,
current_price: f64,
is_long: bool,
) -> Vec<&ScaleInStep>
pub fn triggered_entries( &self, current_price: f64, is_long: bool, ) -> Vec<&ScaleInStep>
Scale-in steps whose trigger_price has been reached by current_price, in the
direction implied by comparing current_price to entry_price (is_long disambiguates
which side “reached” means).
Sourcepub fn triggered_exits(&self, current_r_multiple: f64) -> Vec<&ScaleOutStep>
pub fn triggered_exits(&self, current_r_multiple: f64) -> Vec<&ScaleOutStep>
Scale-out steps whose trigger_r_multiple has been reached by current_r_multiple.
Trait Implementations§
impl StructuralPartialEq for ScalePlan
Auto Trait Implementations§
impl Freeze for ScalePlan
impl RefUnwindSafe for ScalePlan
impl Send for ScalePlan
impl Sync for ScalePlan
impl Unpin for ScalePlan
impl UnsafeUnpin for ScalePlan
impl UnwindSafe for ScalePlan
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