pub enum SignalType {
Enter {
side: OrderSide,
order_type: OrderType,
price: Option<Decimal>,
quantity: Decimal,
time_in_force: TimeInForce,
},
Exit {
side: OrderSide,
order_type: OrderType,
price: Option<Decimal>,
quantity: Decimal,
time_in_force: TimeInForce,
},
Modify {
side: OrderSide,
order_type: OrderType,
price: Option<Decimal>,
quantity: Decimal,
time_in_force: TimeInForce,
},
Cancel {
order_id: String,
},
Info {
message: String,
},
}Expand description
Types of trading signals that can be generated by strategies
Variants§
Enter
Signal to enter a new position
Exit
Signal to exit an existing position
Fields
§
quantity: DecimalQuantity to exit with
§
time_in_force: TimeInForceTime in force for the order
Modify
Signal to modify an existing position
Fields
§
quantity: DecimalNew quantity (absolute value, not delta)
§
time_in_force: TimeInForceTime in force for the order
Cancel
Signal to cancel an existing order
Fields
§
order_id: StringID of the order to cancel
Info
Informational signal (no action required)
Fields
§
message: StringInformation message
Trait Implementations§
Source§impl Clone for SignalType
impl Clone for SignalType
Source§fn clone(&self) -> SignalType
fn clone(&self) -> SignalType
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SignalType
impl RefUnwindSafe for SignalType
impl Send for SignalType
impl Sync for SignalType
impl Unpin for SignalType
impl UnwindSafe for SignalType
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