pub struct ZScoreEngine { /* private fields */ }Expand description
Rolling z-score of the close.
Z = (close - mean) / sd over the last period closes, this one included, with the
population standard deviation (divisor period); 0 when the deviation is below 1e-8.
period is at least 2.
First output: with the period-th bar. Indicator::reset clears the window.
Implementations§
Trait Implementations§
Source§impl Clone for ZScoreEngine
impl Clone for ZScoreEngine
Source§fn clone(&self) -> ZScoreEngine
fn clone(&self) -> ZScoreEngine
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ZScoreEngine
impl Debug for ZScoreEngine
Source§impl Indicator for ZScoreEngine
impl Indicator for ZScoreEngine
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 ZScoreEngine
impl RefUnwindSafe for ZScoreEngine
impl Send for ZScoreEngine
impl Sync for ZScoreEngine
impl Unpin for ZScoreEngine
impl UnsafeUnpin for ZScoreEngine
impl UnwindSafe for ZScoreEngine
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