pub struct WmaEngine { /* private fields */ }Expand description
Weighted Moving Average (WMA) over the closing price.
Linearly weighted over the last period closes: weight period on the most recent close down
to 1 on the oldest, divided by the weight sum period * (period + 1) / 2.
First output: with the period-th bar. Indicator::reset clears the window.
Implementations§
Trait Implementations§
Source§impl Indicator for WmaEngine
impl Indicator for WmaEngine
fn name(&self) -> &str
fn warmup_period(&self) -> usize
fn reset(&mut self)
fn on_bar(&mut self, bar: &Bar) -> Option<IndicatorOutput>
fn alerts(&self) -> Vec<IndicatorAlert>
Source§fn on_checked_bar(
&mut self,
bar: &Bar,
) -> Result<Option<IndicatorOutput>, BarValidationError>
fn on_checked_bar( &mut self, bar: &Bar, ) -> Result<Option<IndicatorOutput>, BarValidationError>
Validates a bar before forwarding it to
Indicator::on_bar.Auto Trait Implementations§
impl Freeze for WmaEngine
impl RefUnwindSafe for WmaEngine
impl Send for WmaEngine
impl Sync for WmaEngine
impl Unpin for WmaEngine
impl UnsafeUnpin for WmaEngine
impl UnwindSafe for WmaEngine
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