Struct trade_aggregation::ModularVolumeAggregator [−][src]
pub struct ModularVolumeAggregator { /* fields omitted */ }
Expand description
The modular equivalent of VolumeAggregator
Implementations
impl ModularVolumeAggregator
[src]
impl ModularVolumeAggregator
[src]pub fn new(vol_threshold: f64, by: By) -> Self
[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]
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]
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