pub struct TrailingStop {
pub symbol: String,
pub is_buy: bool,
pub size: f64,
pub trail_bps: u32,
pub step_bps: u32,
pub limit_price: Option<f64>,
pub iso: bool,
}Expand description
Trailing stop: protective stop that follows price by a fixed distance in bps,
resetting forward on favorable moves in increments of step_bps.
Fields§
§symbol: String§is_buy: boolProtected position direction (true = long, false = short)
size: f64§trail_bps: u32Trailing distance in basis points
step_bps: u32Favorable reset step in basis points
limit_price: Option<f64>Optional triggered limit price; None means market-style trigger
iso: boolIsolated-margin flag
Trait Implementations§
Source§impl Clone for TrailingStop
impl Clone for TrailingStop
Source§fn clone(&self) -> TrailingStop
fn clone(&self) -> TrailingStop
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TrailingStop
impl Debug for TrailingStop
Source§impl<'de> Deserialize<'de> for TrailingStop
impl<'de> Deserialize<'de> for TrailingStop
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
Source§impl From<TrailingStop> for OrderItem
impl From<TrailingStop> for OrderItem
Source§fn from(trl: TrailingStop) -> Self
fn from(trl: TrailingStop) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TrailingStop
impl PartialEq for TrailingStop
Source§impl Serialize for TrailingStop
impl Serialize for TrailingStop
impl StructuralPartialEq for TrailingStop
Auto Trait Implementations§
impl Freeze for TrailingStop
impl RefUnwindSafe for TrailingStop
impl Send for TrailingStop
impl Sync for TrailingStop
impl Unpin for TrailingStop
impl UnsafeUnpin for TrailingStop
impl UnwindSafe for TrailingStop
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more