[][src]Struct apo_rs::APO

pub struct APO { /* fields omitted */ }

Absolute Price Oscillator (APO)

use ta_common::traits::Indicator;
use apo_rs::APO;
let mut apo = APO::new(2, 5);
assert_eq!(apo.next(81.59), None);
assert_eq!(apo.next(81.06), Some(-0.1766666666666623));
assert_eq!(apo.next(82.87), Some(0.4266666666666623));
assert_eq!(apo.next(83.00), Some(0.5092592592592524));
assert_eq!(apo.next(83.61), Some(0.6177777777777749));
assert_eq!(apo.next(83.15), Some(0.3512757201646082));
assert_eq!(apo.next(82.84), Some(0.11065843621399551));
assert_eq!(apo.next(83.99), Some(0.41593049839961793));
assert_eq!(apo.next(84.55), Some(0.5780064014631705));
assert_eq!(apo.next(84.36), Some(0.4222440684854689));
assert_eq!(apo.next(85.53), Some(0.6837982014936586));
assert_eq!(apo.next(86.54), Some(0.9266328529413386));
assert_eq!(apo.next(86.89), Some(0.8913443637205063));
assert_eq!(apo.next(87.77), Some(0.9787592852891009));
assert_eq!(apo.next(87.29), Some(0.6206827600178713));


APO=eman - emam
n=Short Period
m= Long Period


impl APO[src]

pub fn new(short_period: u32, long_period: u32) -> APO[src]

Trait Implementations

impl Indicator<f64, Option<f64>> for APO[src]

Auto Trait Implementations

impl RefUnwindSafe for APO

impl Send for APO

impl Sync for APO

impl Unpin for APO

impl UnwindSafe for APO

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.