pub enum RawSignal {
Show 18 variants
Entry {
ts: NaiveDateTime,
symbol: String,
side: Side,
order_type: OrderType,
price: Option<f64>,
risk_multiplier: f64,
stoploss: Option<f64>,
targets: Vec<f64>,
group: Option<String>,
trade_id: Option<TradeId>,
},
Close {
ts: NaiveDateTime,
position: PositionRef,
},
ClosePartial {
ts: NaiveDateTime,
position: PositionRef,
ratio: f64,
},
ModifyStoploss {
ts: NaiveDateTime,
position: PositionRef,
price: f64,
},
MoveStoplossToEntry {
ts: NaiveDateTime,
position: PositionRef,
},
AddTarget {
ts: NaiveDateTime,
position: PositionRef,
price: f64,
close_ratio: f64,
},
RemoveTarget {
ts: NaiveDateTime,
position: PositionRef,
price: f64,
},
ModifyTarget {
ts: NaiveDateTime,
position: PositionRef,
old_price: f64,
new_price: f64,
},
AddRule {
ts: NaiveDateTime,
position: PositionRef,
rule: RuleConfigDef,
},
RemoveRule {
ts: NaiveDateTime,
position: PositionRef,
rule_name: String,
},
ScaleIn {
ts: NaiveDateTime,
position: PositionRef,
price: Option<f64>,
size: f64,
},
CancelPending {
ts: NaiveDateTime,
position: PositionRef,
},
CloseAllOf {
ts: NaiveDateTime,
symbol: String,
},
CloseAll {
ts: NaiveDateTime,
},
CancelAllPending {
ts: NaiveDateTime,
},
ModifyAllStoploss {
ts: NaiveDateTime,
symbol: String,
price: f64,
},
CloseAllInGroup {
ts: NaiveDateTime,
group_id: GroupId,
},
ModifyAllStoplossInGroup {
ts: NaiveDateTime,
group_id: GroupId,
price: f64,
},
}Expand description
A raw signal from an external source — entry or management.
Covers both entry signals (which can be profile-transformed) and management signals (which pass through to the engine as-is after position resolution).
Variants§
Entry
Fields
§
ts: NaiveDateTimeClose
ClosePartial
ModifyStoploss
MoveStoplossToEntry
AddTarget
RemoveTarget
ModifyTarget
AddRule
RemoveRule
ScaleIn
CancelPending
CloseAllOf
CloseAll
Fields
§
ts: NaiveDateTimeCancelAllPending
Fields
§
ts: NaiveDateTimeModifyAllStoploss
CloseAllInGroup
ModifyAllStoplossInGroup
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RawSignal
impl<'de> Deserialize<'de> for RawSignal
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 RawSignal
impl RefUnwindSafe for RawSignal
impl Send for RawSignal
impl Sync for RawSignal
impl Unpin for RawSignal
impl UnsafeUnpin for RawSignal
impl UnwindSafe for RawSignal
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