pub struct OrderFlowAnalyzer { /* private fields */ }Expand description
Order Flow Analyzer for comprehensive order flow metrics
Implementations§
Source§impl OrderFlowAnalyzer
impl OrderFlowAnalyzer
Sourcepub fn process_trade(&mut self, trade: &TradeTick) -> Option<f64>
pub fn process_trade(&mut self, trade: &TradeTick) -> Option<f64>
Process trade tick and update metrics
Sourcepub fn process_orderbook_update(
&mut self,
prev_book: &OrderBookSnapshot,
curr_book: &OrderBookSnapshot,
) -> f64
pub fn process_orderbook_update( &mut self, prev_book: &OrderBookSnapshot, curr_book: &OrderBookSnapshot, ) -> f64
Process order book update and calculate OFI
Sourcepub fn get_average_ofi(&self) -> f64
pub fn get_average_ofi(&self) -> f64
Get average OFI over window
Sourcepub fn get_ofi_std(&self) -> f64
pub fn get_ofi_std(&self) -> f64
Get OFI standard deviation
Auto Trait Implementations§
impl Freeze for OrderFlowAnalyzer
impl RefUnwindSafe for OrderFlowAnalyzer
impl Send for OrderFlowAnalyzer
impl Sync for OrderFlowAnalyzer
impl Unpin for OrderFlowAnalyzer
impl UnwindSafe for OrderFlowAnalyzer
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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