pub struct StrategyEngine { /* private fields */ }Expand description
Strategy engine that coordinates data flow and strategy execution
Implementations§
Source§impl StrategyEngine
impl StrategyEngine
Sourcepub fn with_config(config: StrategyEngineConfig) -> Self
pub fn with_config(config: StrategyEngineConfig) -> Self
Creates a new strategy engine with a custom configuration
Sourcepub fn register_strategy(&self, strategy: Arc<dyn Strategy>) -> Result<()>
pub fn register_strategy(&self, strategy: Arc<dyn Strategy>) -> Result<()>
Registers a strategy with the engine
Sourcepub async fn unregister_strategy(&self, strategy_id: &str) -> Result<()>
pub async fn unregister_strategy(&self, strategy_id: &str) -> Result<()>
Unregisters a strategy from the engine
Sourcepub fn trade_sender(&self) -> Sender<MarketTrade>
pub fn trade_sender(&self) -> Sender<MarketTrade>
Gets the trade sender channel
Sourcepub fn depth_sender(&self) -> Sender<OrderBookSnapshot>
pub fn depth_sender(&self) -> Sender<OrderBookSnapshot>
Gets the depth sender channel
Sourcepub fn bar_sender(&self) -> Sender<Bar>
pub fn bar_sender(&self) -> Sender<Bar>
Gets the bar sender channel
Sourcepub fn signal_receiver(&self) -> Receiver<Signal>
pub fn signal_receiver(&self) -> Receiver<Signal>
Gets the signal receiver channel
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StrategyEngine
impl !RefUnwindSafe for StrategyEngine
impl Send for StrategyEngine
impl Sync for StrategyEngine
impl Unpin for StrategyEngine
impl !UnwindSafe for StrategyEngine
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