Module trade_aggregation::candle_components
source · Expand description
This module contains a bunch of ready to use ‘CandleComponents’ that can easily be combined to create a ‘ModularCandle’ using the ‘Candle’ macro.
Structs§
- This ‘CandleComponent’ keeps track of the arithmetic mean price
- This ‘CandleComponent’ keeps track of the close price
- This ‘CandleComponent’ keeps track of the closing timestamp of a Candle, using the same unit resolution as the underlying input of [
TakerTrade.timestamp()
]. - This ‘CandleComponent’ keeps track of the ratio of buys vs total trades
- This ‘CandleComponent’ keeps track of the ratio of buy volume vs total volume
- A
CandleComponent
that computes the binary entropy of whether a trade is a buy or a sell. - This ‘CandleComponent’ keeps track of the high price
- This ‘CandleComponent’ keeps track of the low price
- Computes the median price from a sorted list of trade prices
- This ‘CandleComponent’ keeps track of the number of trades
- This ‘CandleComponent’ keeps track of the opening price of a Candle
- This ‘CandleComponent’ keeps track of the opening timestamp of a Candle, using the same unit resolution as the underlying input of [
TakerTrade.timestamp()
]. - This ‘CandleComponent’ keeps track of the standard deviation in trade prices
- This ‘CandleComponent’ keeps track of the standard deviation in the trade sizes
- Measures the velocity of candle creation based on the formula: 1.0 / t , where t is measured in seconds The higher the velocity the faster the candle has been created
- A
CandleComponent
that gathers all observed trades and returns them. Be careful, thevalue
method clones the inner vector, due to the trait definition and lifetime restrictions. So call sparingly. - This ‘CandleComponent’ keeps track of the cumulative volume
- This ‘CandleComponent’ keeps track of the volume weighted price
Traits§
- Each component of a Candle must fullfill this trait
- Each component of a Candle must fullfill this trait