pub struct AlligatorEngine { /* private fields */ }Expand description
Williams Alligator: three smoothed averages of the median price, shifted forward.
Jaw, teeth and lips are Wilder averages (Rma, seeded with the SMA of their first values)
of (high + low) / 2 over 13, 8 and 5 bars, shifted forward by 8, 5 and 3 bars: the value
published for a line is the one it had that many outputs earlier. The shift is applied through
a window that only starts filling once all three averages exist, so right after the first
output it is still zero and reaches its full length after 8, 5 and 3 further outputs.
value and extra["lips"]: the lips; extra["jaw"] and extra["teeth"]. First output: with
the 13th bar, when the jaw’s average exists. Indicator::reset clears the averages and the
shift windows.
Implementations§
Trait Implementations§
Source§impl Clone for AlligatorEngine
impl Clone for AlligatorEngine
Source§fn clone(&self) -> AlligatorEngine
fn clone(&self) -> AlligatorEngine
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 AlligatorEngine
impl Debug for AlligatorEngine
Source§impl Default for AlligatorEngine
impl Default for AlligatorEngine
Source§impl Indicator for AlligatorEngine
impl Indicator for AlligatorEngine
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 AlligatorEngine
impl RefUnwindSafe for AlligatorEngine
impl Send for AlligatorEngine
impl Sync for AlligatorEngine
impl Unpin for AlligatorEngine
impl UnsafeUnpin for AlligatorEngine
impl UnwindSafe for AlligatorEngine
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