pub struct SniperAlgorithm { /* private fields */ }Expand description
Fires a single aggressive order once a target price is touched.
Implementations§
Trait Implementations§
Source§impl ExecutionAlgorithm for SniperAlgorithm
impl ExecutionAlgorithm for SniperAlgorithm
Source§fn status(&self) -> AlgoStatus
fn status(&self) -> AlgoStatus
Returns the current status of the algorithm.
Source§fn start(&mut self) -> Result<Vec<ChildOrderRequest>>
fn start(&mut self) -> Result<Vec<ChildOrderRequest>>
Start the algorithm and return any initial child orders.
Source§fn on_child_order_placed(&mut self, _order: &Order)
fn on_child_order_placed(&mut self, _order: &Order)
Called when a child order has been successfully placed.
Source§fn on_fill(&mut self, fill: &Fill) -> Result<Vec<ChildOrderRequest>>
fn on_fill(&mut self, fill: &Fill) -> Result<Vec<ChildOrderRequest>>
Called when a fill is received for one of this algorithm’s child orders.
Source§fn on_tick(&mut self, tick: &Tick) -> Result<Vec<ChildOrderRequest>>
fn on_tick(&mut self, tick: &Tick) -> Result<Vec<ChildOrderRequest>>
Called when market tick data is received (mainly for VWAP algorithms).
Source§fn on_timer(&mut self) -> Result<Vec<ChildOrderRequest>>
fn on_timer(&mut self) -> Result<Vec<ChildOrderRequest>>
Called when a timer event occurs (mainly for TWAP algorithms).
Auto Trait Implementations§
impl Freeze for SniperAlgorithm
impl RefUnwindSafe for SniperAlgorithm
impl Send for SniperAlgorithm
impl Sync for SniperAlgorithm
impl Unpin for SniperAlgorithm
impl UnwindSafe for SniperAlgorithm
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