pub struct SignalEngineStrategy { /* private fields */ }Expand description
A generic engine strategy driven by one or more PriceStrategy signals.
Rigor: Heuristic. Translates technical indicators (MA crossover, RSI, etc.) into order-book orders. No HJB or optimal-control derivation.
Supports combining multiple signals with AND/OR/Majority logic.
Implementations§
Source§impl SignalEngineStrategy
impl SignalEngineStrategy
Sourcepub fn new(
signal_source: Box<dyn PriceStrategy>,
combinator: SignalCombinator,
sizing: PositionSizing,
) -> Self
pub fn new( signal_source: Box<dyn PriceStrategy>, combinator: SignalCombinator, sizing: PositionSizing, ) -> Self
Create a strategy driven by a single PriceStrategy.
Sourcepub fn new_multi(
signal_sources: Vec<Box<dyn PriceStrategy>>,
combinator: SignalCombinator,
sizing: PositionSizing,
) -> Self
pub fn new_multi( signal_sources: Vec<Box<dyn PriceStrategy>>, combinator: SignalCombinator, sizing: PositionSizing, ) -> Self
Create a strategy driven by multiple PriceStrategy sources.
Trait Implementations§
Source§impl Strategy for SignalEngineStrategy
impl Strategy for SignalEngineStrategy
Source§fn on_tick(&mut self, obs: &Observation, requests: &mut Vec<OrderRequest>)
fn on_tick(&mut self, obs: &Observation, requests: &mut Vec<OrderRequest>)
Called each tick with the agent’s filtered observation.
Appends order requests (New, Cancel, CancelAll) to the provided buffer.
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Downcast helper — returns
self as &mut dyn Any.Auto Trait Implementations§
impl !RefUnwindSafe for SignalEngineStrategy
impl !UnwindSafe for SignalEngineStrategy
impl Freeze for SignalEngineStrategy
impl Send for SignalEngineStrategy
impl Sync for SignalEngineStrategy
impl Unpin for SignalEngineStrategy
impl UnsafeUnpin for SignalEngineStrategy
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more