Trait Next

Source
pub trait Next<T> {
    // Required method
    fn next(&mut self, input: &T) -> f64;
}
Expand description

Consumes a data item of type T and returns Output.

Typically T can be f64 or a struct similar to DataItem, that implements traits necessary to calculate value of a particular indicator.

In most cases Output is f64, but sometimes it can be different. For example for MACD it is (f64, f64, f64) since MACD returns 3 values.

Required Methods§

Source

fn next(&mut self, input: &T) -> f64

Implementors§