pub enum MaStream {
Sma(TalibSma),
Ema(TalibEma),
Wma(TalibWma),
Dema(DEMA),
Tema(TalibTema),
Trima(TRIMA),
Kama(KAMA),
Mama(Box<TalibMama>),
T3(T3),
}Expand description
Streaming MA matching talib_rs’s compute_ma for all nine MaTypes.
Variants§
Sma(TalibSma)
Ema(TalibEma)
Wma(TalibWma)
Dema(DEMA)
Tema(TalibTema)
Trima(TRIMA)
Kama(KAMA)
Mama(Box<TalibMama>)
Boxed: the Hilbert engine dwarfs the other variants.
T3(T3)
Implementations§
Source§impl MaStream
impl MaStream
Sourcepub fn new(period: usize, ma_type: MaType) -> Self
pub fn new(period: usize, ma_type: MaType) -> Self
Build the streaming MA for ma_type.
MaType::Mama ignores period and uses fastlimit = 0.5,
slowlimit = 0.05; MaType::T3 uses vfactor = 0.7. Both match what
C TA-Lib’s ta_MA.c does when those families are selected through a
matype argument.
pub fn next(&mut self, v: f64) -> f64
Trait Implementations§
Auto Trait Implementations§
impl Forget for MaStream
impl Freeze for MaStream
impl RefUnwindSafe for MaStream
impl Send for MaStream
impl Sync for MaStream
impl Unpin for MaStream
impl UnsafeUnpin for MaStream
impl UnwindSafe for MaStream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.