pub struct LegEfficiencyEngine { /* private fields */ }Expand description
Kaufman Efficiency Ratio: net movement over path length.
Over the last len + 1 closes, ER = |close_t - close_{t-len}| / sum(|close_i - close_{i-1}|),
and 0 when nothing moved. 1 means the closes went straight from one end to the other, values
near 0 that they travelled far and arrived nowhere. Alerts fire at >= 0.65 and <= 0.20.
First output: with the len + 1-th bar. Indicator::reset clears the window.
Implementations§
Trait Implementations§
Source§impl Clone for LegEfficiencyEngine
impl Clone for LegEfficiencyEngine
Source§fn clone(&self) -> LegEfficiencyEngine
fn clone(&self) -> LegEfficiencyEngine
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 LegEfficiencyEngine
impl Debug for LegEfficiencyEngine
Source§impl Indicator for LegEfficiencyEngine
impl Indicator for LegEfficiencyEngine
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 LegEfficiencyEngine
impl RefUnwindSafe for LegEfficiencyEngine
impl Send for LegEfficiencyEngine
impl Sync for LegEfficiencyEngine
impl Unpin for LegEfficiencyEngine
impl UnsafeUnpin for LegEfficiencyEngine
impl UnwindSafe for LegEfficiencyEngine
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