pub struct EMA { /* private fields */ }Expand description
Incremental EMA — O(1) update, SMA warm-up.
Unlike the batch ema function (which initialises from an SMA over the
first period prices), this struct emits its first value after it has
accumulated exactly period samples and seeds itself from their average.
Both approaches are correct; this one is more natural for streaming use.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EMA
impl RefUnwindSafe for EMA
impl Send for EMA
impl Sync for EMA
impl Unpin for EMA
impl UnsafeUnpin for EMA
impl UnwindSafe for EMA
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