#[non_exhaustive]pub enum OrderFlowKind {
Spread,
BookSize {
levels: usize,
distance: f64,
},
TradeRate {
volume: bool,
seconds: usize,
instant: usize,
},
AggressorRate {
seconds: usize,
instant: usize,
},
LevelsExecuted {
seconds: usize,
reversal: bool,
},
SizeDelta {
ranges: [[f64; 2]; 3],
},
FlowSum {
bars: usize,
},
FilteredCvd {
min: f64,
max: f64,
},
LevelsTradedThrough {
seconds: usize,
},
}Expand description
Fixed stream aggregation performed before a feed coalesces its updates for painting.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Spread
Last, arithmetic mean and maximum quoted spread, in instrument ticks, per bar.
BookSize
Last resting bid size, ask size and their difference. distance == 0 selects the
nearest levels on each side; a positive distance selects prices within that many
price units of each side’s inside market, inclusive. With an OrderFilter (see
OrderFlowInput::with_order_filter) the sizes are those of the individual orders it
accepts, and a bar whose feed sends aggregate depth only has no value.
Fields
TradeRate
Bar total, rolling rate per second and instant rate per second. Windows are
(now - seconds, now]; volume == false counts executions, including zero-size ones.
Fields
AggressorRate
Distinct explicitly identified aggressor orders: the bar total, and the rolling and
instant rates per second over (now - seconds, now]. Fills sharing an aggressor order
id count once, however many fills or windows they span; fills without one are neither
merged nor counted.
LevelsExecuted
Distinct prices that buy and sell executions printed at, per bar when seconds == 0,
otherwise over (now - seconds, now], and their sum. Only executions count, so a
quote that moves because a resting order was cancelled adds nothing, unlike
LevelsTradedThrough. Executions of unknown side count
for neither side.
Fields
SizeDelta
Buy minus sell volume per bar, counting only executions whose size lies in each of three
inclusive [min, max] ranges, all from the same trades. A range with min > max
matches nothing; executions of unknown side count for no range.
FlowSum
Total volume and buy minus sell volume per bar, which a study sums over bars bars.
FilteredCvd
Buy minus sell volume, its highest and lowest running value including zero, per bar,
counting executions whose size lies in the inclusive range. A study accumulates the
delta into a cumulative volume delta. The sum starts at the oldest
bar with a retained value, so it starts again from a later bar after the input drops its
oldest bars (see OrderFlowInput).
LevelsTradedThrough
Absolute bid and ask movement in ticks and their sum, per bar when seconds == 0,
otherwise over (now - seconds, now]. The first quote after book loss seeds anew.
Trait Implementations§
Source§impl Clone for OrderFlowKind
impl Clone for OrderFlowKind
Source§fn clone(&self) -> OrderFlowKind
fn clone(&self) -> OrderFlowKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for OrderFlowKind
Source§impl Debug for OrderFlowKind
impl Debug for OrderFlowKind
Source§impl PartialEq for OrderFlowKind
impl PartialEq for OrderFlowKind
impl StructuralPartialEq for OrderFlowKind
Auto Trait Implementations§
impl Freeze for OrderFlowKind
impl RefUnwindSafe for OrderFlowKind
impl Send for OrderFlowKind
impl Sync for OrderFlowKind
impl Unpin for OrderFlowKind
impl UnsafeUnpin for OrderFlowKind
impl UnwindSafe for OrderFlowKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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