Function traquer::volume::nvi

source ·
pub fn nvi<'a>(
    data: &'a [f64],
    volume: &'a [f64],
) -> impl Iterator<Item = f64> + 'a
Expand description

Negative Volume Index

Based on price moves depending on whether the current volume is higher than the previous period.

§Usage

When above the one year average, confirmation of downtrend.

§Sources

[1]

§Examples

use traquer::volume;

volume::nvi(
    &vec![1.0,2.0,3.0,4.0,5.0,6.0,4.0,5.0],
    &vec![1.0,2.0,3.0,4.0,5.0,6.0,4.0,5.0]).collect::<Vec<f64>>();