Trait Next

Source
pub trait Next<T> {
    type Output;

    // Required method
    fn next(&mut self, input: T) -> Self::Output;
}
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 Associated Types§

Required Methods§

Source

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

Implementors§

Source§

impl Next<f64> for AverageTrueRange

Source§

impl Next<f64> for BollingerBands

Source§

impl Next<f64> for EfficiencyRatio

Source§

impl Next<f64> for ExponentialMovingAverage

Source§

impl Next<f64> for FastStochastic

Source§

impl Next<f64> for HHV

Source§

impl Next<f64> for LLV

Source§

impl Next<f64> for Maximum

Source§

impl Next<f64> for Minimum

Source§

impl Next<f64> for MovingAverage

Source§

impl Next<f64> for MovingAverageConvergenceDivergence

Source§

impl Next<f64> for RateOfChange

Source§

impl Next<f64> for RelativeStrengthIndex

Source§

impl Next<f64> for SimpleMovingAverage

Source§

impl Next<f64> for SlowStochastic

Source§

impl Next<f64> for StandardDeviation

Source§

impl Next<f64> for TrueRange

Source§

impl<'a, T: Close + Volume> Next<&'a T> for OnBalanceVolume

Source§

impl<'a, T: Close> Next<&'a T> for BollingerBands

Source§

impl<'a, T: Close> Next<&'a T> for EfficiencyRatio

Source§

impl<'a, T: Close> Next<&'a T> for ExponentialMovingAverage

Source§

impl<'a, T: Close> Next<&'a T> for MovingAverage

Source§

impl<'a, T: Close> Next<&'a T> for MovingAverageConvergenceDivergence

Source§

impl<'a, T: Close> Next<&'a T> for RateOfChange

Source§

impl<'a, T: Close> Next<&'a T> for RelativeStrengthIndex

Source§

impl<'a, T: Close> Next<&'a T> for SimpleMovingAverage

Source§

impl<'a, T: Close> Next<&'a T> for StandardDeviation

Source§

impl<'a, T: High + Low + Close + Volume> Next<&'a T> for MoneyFlowIndex

Source§

impl<'a, T: High + Low + Close> Next<&'a T> for AverageTrueRange

Source§

impl<'a, T: High + Low + Close> Next<&'a T> for FastStochastic

Source§

impl<'a, T: High + Low + Close> Next<&'a T> for SlowStochastic

Source§

impl<'a, T: High + Low + Close> Next<&'a T> for TrueRange

Source§

impl<'a, T: High> Next<&'a T> for HHV

Source§

impl<'a, T: High> Next<&'a T> for Maximum

Source§

impl<'a, T: Low> Next<&'a T> for LLV

Source§

impl<'a, T: Low> Next<&'a T> for Minimum