Skip to main content

HiResVolumeFlowEngine

Struct HiResVolumeFlowEngine 

Source
pub struct HiResVolumeFlowEngine { /* private fields */ }
Expand description

Streaming high-resolution volume flow engine.

Implementations§

Source§

impl HiResVolumeFlowEngine

Source

pub fn new(window_len: usize) -> Self

Source

pub fn reset(&mut self)

Source

pub fn on_bar_with_aggressor( &mut self, bar: &Bar, aggressor: AggressorVolume, ) -> HiResVolumeFlowOutput

High-resolution path: feeds a bar with directly known aggressor volume (e.g. aggregated from trade-tape data).

Source

pub fn on_intrabar_group( &mut self, group: &IntrabarGroup, ) -> HiResVolumeFlowOutput

High-resolution path: feeds a confirmed IntrabarGroup (a parent bar’s full ordered child-bar sequence), summing each child’s own OHLC-inferred delta instead of applying the heuristic once to the aggregate parent bar — preserves the intrabar price path the aggregate alone loses.

Source

pub fn on_bar_estimated(&mut self, bar: &Bar) -> HiResVolumeFlowOutput

Fallback path: OHLC-inferred estimate when no direct aggressor or intrabar data is available, explicitly tagged as such via BarQuality::volume_available staying accurate but the estimate not being a genuine tick-level measurement.

Trait Implementations§

Source§

impl Indicator for HiResVolumeFlowEngine

Source§

fn on_bar(&mut self, bar: &Bar) -> Option<IndicatorOutput>

Delegates to the OHLC-estimated fallback path; use HiResVolumeFlowEngine::on_bar_with_aggressor or HiResVolumeFlowEngine::on_intrabar_group directly for the high-resolution paths, which this trait’s single-Bar signature cannot express.

Source§

fn name(&self) -> &str

Source§

fn reset(&mut self)

Source§

fn alerts(&self) -> Vec<IndicatorAlert>

Source§

fn warmup_period(&self) -> usize

Source§

fn on_checked_bar( &mut self, bar: &Bar, ) -> Result<Option<IndicatorOutput>, BarValidationError>

Validates a bar before forwarding it to Indicator::on_bar.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.