twiggs

Function twiggs 

Source
pub fn twiggs<'a, T: ToPrimitive, U: ToPrimitive>(
    high: &'a [T],
    low: &'a [T],
    close: &'a [T],
    volume: &'a [U],
    window: usize,
) -> impl Iterator<Item = f64> + 'a
Expand description

Twiggs Money Flow

Developed by Colin Twiggs that measures the flow of money into and out of a security. It’s similar to the Accumulation/Distribution Line. A rising TMF indicates buying pressure, as more money is flowing into the security.

§Usage

A value above 0 suggests an uptrend.

§Sources

[1] [2]

§Examples

use traquer::volume;

volume::twiggs(
    &[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],
    &[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],
    6).collect::<Vec<f64>>();