pub struct EnvelopeEngine { /* private fields */ }Expand description
Moving-average envelope: an SMA with bands a fixed percentage away.
basis = SMA(period) of the close; upper/lower = basis ± basis * percent / 100.
value and extra["basis"]: the basis; extra["upper"] and extra["lower"]. First output:
with the period-th bar. Indicator::reset clears the average.
Implementations§
Trait Implementations§
Source§impl Clone for EnvelopeEngine
impl Clone for EnvelopeEngine
Source§fn clone(&self) -> EnvelopeEngine
fn clone(&self) -> EnvelopeEngine
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 EnvelopeEngine
impl Debug for EnvelopeEngine
Source§impl Indicator for EnvelopeEngine
impl Indicator for EnvelopeEngine
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 EnvelopeEngine
impl RefUnwindSafe for EnvelopeEngine
impl Send for EnvelopeEngine
impl Sync for EnvelopeEngine
impl Unpin for EnvelopeEngine
impl UnsafeUnpin for EnvelopeEngine
impl UnwindSafe for EnvelopeEngine
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