pub struct TriggerIntent {
pub side: Side,
pub size: Covers,
pub tpsl: Tpsl,
pub exit: Exit,
pub cloid: Option<Cloid>,
}Expand description
A take profit or stop loss on its own. side is the side that closes:
a sell for a long.
Fields§
§side: SideThe side that closes: a sell for a long.
size: CoversHow much of the position it closes.
tpsl: TpslTake profit or stop loss.
exit: ExitWhere it fires and how it fills.
cloid: Option<Cloid>The client order id; None for none.
Implementations§
Source§impl TriggerIntent
impl TriggerIntent
Sourcepub const fn new(
side: Side,
size: Covers,
tpsl: Tpsl,
exit: Exit,
) -> TriggerIntent
pub const fn new( side: Side, size: Covers, tpsl: Tpsl, exit: Exit, ) -> TriggerIntent
Without a client order id.
Sourcepub const fn with_cloid(self, cloid: Cloid) -> TriggerIntent
pub const fn with_cloid(self, cloid: Cloid) -> TriggerIntent
Sent with this client order id.
Trait Implementations§
Source§impl Clone for TriggerIntent
impl Clone for TriggerIntent
impl Copy for TriggerIntent
Source§impl Debug for TriggerIntent
impl Debug for TriggerIntent
impl Eq for TriggerIntent
Source§impl PartialEq for TriggerIntent
impl PartialEq for TriggerIntent
impl StructuralPartialEq for TriggerIntent
Auto Trait Implementations§
impl Forget for TriggerIntent
impl Freeze for TriggerIntent
impl Move for TriggerIntent
impl RefUnwindSafe for TriggerIntent
impl Send for TriggerIntent
impl Sync for TriggerIntent
impl Unpin for TriggerIntent
impl UnsafeUnpin for TriggerIntent
impl UnwindSafe for TriggerIntent
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.