pub struct Indicators { /* private fields */ }Expand description
Registry for actor and strategy indicator callbacks.
Implementations§
Source§impl Indicators
impl Indicators
Sourcepub fn registered_indicators(&self) -> Vec<SharedActorIndicator> ⓘ
pub fn registered_indicators(&self) -> Vec<SharedActorIndicator> ⓘ
Returns the registered indicators.
Sourcepub fn initialized(&self) -> Result<bool>
pub fn initialized(&self) -> Result<bool>
Returns whether all registered indicators are initialized.
§Errors
Returns an error if a registered indicator cannot report readiness.
Sourcepub fn register_indicator_for_quote_ticks(
&mut self,
instrument_id: InstrumentId,
indicator: SharedActorIndicator,
)
pub fn register_indicator_for_quote_ticks( &mut self, instrument_id: InstrumentId, indicator: SharedActorIndicator, )
Registers an indicator to receive quote ticks for an instrument.
Sourcepub fn register_indicator_for_trade_ticks(
&mut self,
instrument_id: InstrumentId,
indicator: SharedActorIndicator,
)
pub fn register_indicator_for_trade_ticks( &mut self, instrument_id: InstrumentId, indicator: SharedActorIndicator, )
Registers an indicator to receive trade ticks for an instrument.
Sourcepub fn register_indicator_for_bars(
&mut self,
bar_type: BarType,
indicator: SharedActorIndicator,
)
pub fn register_indicator_for_bars( &mut self, bar_type: BarType, indicator: SharedActorIndicator, )
Registers an indicator to receive bars for a bar type.
Sourcepub fn handle_quote(&self, quote: &QuoteTick) -> Result<()>
pub fn handle_quote(&self, quote: &QuoteTick) -> Result<()>
Handles a quote tick with registered indicators.
§Errors
Returns an error if a registered indicator cannot handle the quote tick.
Sourcepub fn handle_quotes(&self, quotes: &[QuoteTick]) -> Result<()>
pub fn handle_quotes(&self, quotes: &[QuoteTick]) -> Result<()>
Handles quote ticks with registered indicators.
§Errors
Returns an error if a registered indicator cannot handle a quote tick.
Sourcepub fn handle_trade(&self, trade: &TradeTick) -> Result<()>
pub fn handle_trade(&self, trade: &TradeTick) -> Result<()>
Handles a trade tick with registered indicators.
§Errors
Returns an error if a registered indicator cannot handle the trade tick.
Sourcepub fn handle_trades(&self, trades: &[TradeTick]) -> Result<()>
pub fn handle_trades(&self, trades: &[TradeTick]) -> Result<()>
Handles trade ticks with registered indicators.
§Errors
Returns an error if a registered indicator cannot handle a trade tick.
Sourcepub fn handle_bar(&self, bar: &Bar) -> Result<()>
pub fn handle_bar(&self, bar: &Bar) -> Result<()>
Handles a bar with registered indicators.
§Errors
Returns an error if a registered indicator cannot handle the bar.
Sourcepub fn handle_bars(&self, bars: &[Bar]) -> Result<()>
pub fn handle_bars(&self, bars: &[Bar]) -> Result<()>
Handles bars with registered indicators.
§Errors
Returns an error if a registered indicator cannot handle a bar.
Trait Implementations§
Source§impl Clone for Indicators
impl Clone for Indicators
Source§fn clone(&self) -> Indicators
fn clone(&self) -> Indicators
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more