Struct trade_aggregation::ModularVolumeAggregator [−][src]
The modular equivalent of VolumeAggregator
Implementations
impl ModularVolumeAggregator[src]
pub fn new(vol_threshold: f64, by: By) -> Self[src]
Create a new modular volume aggregator
Parameters
- vol_threshold: create a new candle after this total volume has been reached
- by: determines how to interpret the trade size, either as denoted in QUOTE or in BASE
pub fn add_feature(&mut self, feature: FeatureModules)[src]
Add a feature module to gain a new candle feature
pub fn update(&mut self, trade: &Trade) -> Option<ModularCandle>[src]
Adds a new trade to aggregation Returns Some(Candle) only when a new candle has been created, otherwise it returns None
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ModularVolumeAggregator
impl !Send for ModularVolumeAggregator
impl !Sync for ModularVolumeAggregator
impl Unpin for ModularVolumeAggregator
impl !UnwindSafe for ModularVolumeAggregator
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,