How data items and indicators work
masterThe library is built around two main concepts: Data Items and Indicators.
Data Items
A data item representing a stock quote can implement several traits to provide necessary price/volume information. While you can implement your own, it is recommended to use DataItem.
Required traits for indicators:
OpenHighLowCloseVolume
Indicators
Indicators process these data items and typically implement these traits:
Next<T>(commonlyNext<f64>orNext<&DataItem>) - used to feed a new value into the indicator and retrieve the calculated result.Reset- used to reset the indicator state.Debug,Display,Default,Clone- standard Rust traits.