pub struct Trailing {
pub symbol: Arc<str>,
pub is_buy: bool,
pub size: f64,
pub trail_bps: u32,
pub step_bps: u32,
pub limit: Option<f64>,
pub meta: ActionMeta,
}Expand description
Trailing stop configuration.
The executor materializes this as a protective stop leg plus a rotating
sentinel leg that ratchets the stop when price moves favorably by step_bps.
Fields§
§symbol: Arc<str>Which Instrument
is_buy: boolIndicates whether protected position direction is buy/long.
size: f64Size to be done if triggered
trail_bps: u32Trailing distance in basis points.
step_bps: u32Favorable reset step in basis points.
limit: Option<f64>Optional limit px if stop trigger should place a limit order.
meta: ActionMetaTrait Implementations§
Source§impl<'de> Deserialize<'de> for Trailing
impl<'de> Deserialize<'de> for Trailing
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 Trailing
impl RefUnwindSafe for Trailing
impl Send for Trailing
impl Sync for Trailing
impl Unpin for Trailing
impl UnsafeUnpin for Trailing
impl UnwindSafe for Trailing
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