pub fn pvi<'a, T: ToPrimitive, U: ToPrimitive>(
data: &'a [T],
volume: &'a [U],
) -> impl Iterator<Item = f64> + 'aExpand description
Positive 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 uptrend.
§Sources
§Examples
use traquer::volume;
volume::pvi(
&[1.0,2.0,3.0,4.0,5.0,6.0,4.0,5.0],
&[1.0,2.0,3.0,4.0,5.0,6.0,4.0,5.0]).collect::<Vec<f64>>();