pub struct TrueRangeEngine { /* private fields */ }Expand description
True Range in price units.
max(high - low, |high - prev_close|, |low - prev_close|), and high - low on the first bar,
which has no previous close. First output: with the first bar. Indicator::reset forgets the
previous close.
Implementations§
Trait Implementations§
Source§impl Default for TrueRangeEngine
impl Default for TrueRangeEngine
Source§impl Indicator for TrueRangeEngine
impl Indicator for TrueRangeEngine
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 TrueRangeEngine
impl RefUnwindSafe for TrueRangeEngine
impl Send for TrueRangeEngine
impl Sync for TrueRangeEngine
impl Unpin for TrueRangeEngine
impl UnsafeUnpin for TrueRangeEngine
impl UnwindSafe for TrueRangeEngine
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