[−][src]Struct ppo_rs::PPO
Percentage Price Oscillator (PPO)
use ppo_rs::PPO; use ta_common::traits::Indicator; let mut ppo = PPO::new(2, 5); assert_eq!(ppo.next(81.59), None); assert_eq!(ppo.next(81.06), Some(-0.21699967245331922)); assert_eq!(ppo.next(82.87), Some(0.5209675887612042)); assert_eq!(ppo.next(83.00), Some(0.6190403299147216)); assert_eq!(ppo.next(83.61), Some(0.7468846224456406)); assert_eq!(ppo.next(83.15), Some(0.4239424161439804)); assert_eq!(ppo.next(82.84), Some(0.13356017757692787)); assert_eq!(ppo.next(83.99), Some(0.4997247953737079)); assert_eq!(ppo.next(84.55), Some(0.690806261787222)); assert_eq!(ppo.next(84.36), Some(0.503265546395477)); assert_eq!(ppo.next(85.53), Some(0.8097662523725208)); assert_eq!(ppo.next(86.54), Some(1.0883304662225042)); assert_eq!(ppo.next(86.89), Some(1.039770979517235)); assert_eq!(ppo.next(87.77), Some(1.1327352631554244)); assert_eq!(ppo.next(87.29), Some(0.7158876517890078));
Implementations
impl PPO
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PPO
impl Send for PPO
impl Sync for PPO
impl Unpin for PPO
impl UnwindSafe for PPO
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,