Major v4 Release
The 4th version of this crate introduces the 'GenericAggregator' which is generic over the type of Candle being produced as well as by which rules they are created., e.g. time, volume or other information driven rule.
Candles consist of types that implement the 'CandleComponent' trait and utilize the new 'Candle' derive macro to glue things together. This automatically implements the 'ModularCandle' trait, which enables users to define candles to be produced during the aggregation process.
It also generates getter methods with the name of the component inside the candle.
The rules dictating the conditions under which a Candle is emitted implement the 'AggregationRule' trait, which allows users to easily plug in their own logic for triggering candle creation beyond the time or volume rules.
This is all done in basically two lines of code (except the actual candle definition, where the LOC grow linearly with the number of components in it obviously).
All these changes make for the most flexible, modular and high performance trade aggregation crate out there, benchmarks and tests included.
Happy Trading!