pub struct WaveTrendEngine { /* private fields */ }Expand description
WaveTrend oscillator.
ap = (high + low + close) / 3
esa = Ema(n1)(ap) d = Ema(n1)(|ap - esa|)
ci = (ap - esa) / (0.015 * d) (0 for d <= 1e-8)
wt1 = Ema(n2)(ci) wt2 = SMA(4)(wt1)All EMAs are the shared Ema with its first-sample seed, running from the first bar.
value and extra["wt1"]: wt1; extra["wt2"], extra["hist"] (wt1 - wt2) and the two
levels. First output: with the fourth bar, once wt2 exists. Indicator::reset clears all
averages.
Implementations§
Trait Implementations§
Source§impl Clone for WaveTrendEngine
impl Clone for WaveTrendEngine
Source§fn clone(&self) -> WaveTrendEngine
fn clone(&self) -> WaveTrendEngine
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 WaveTrendEngine
impl Debug for WaveTrendEngine
Source§impl Indicator for WaveTrendEngine
impl Indicator for WaveTrendEngine
fn name(&self) -> &str
fn warmup_period(&self) -> usize
fn on_bar(&mut self, bar: &Bar) -> Option<IndicatorOutput>
fn reset(&mut self)
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 WaveTrendEngine
impl RefUnwindSafe for WaveTrendEngine
impl Send for WaveTrendEngine
impl Sync for WaveTrendEngine
impl Unpin for WaveTrendEngine
impl UnsafeUnpin for WaveTrendEngine
impl UnwindSafe for WaveTrendEngine
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