pub struct RviEngine { /* private fields */ }Expand description
Vigor index: the close-open span relative to the range, averaged.
RVI = SMA(period)((close - open) / (high - low)), the range floored at 1e-8;
extra["signal"] is SMA(4) of the RVI and extra["rvi"] repeats the value. This is a plain
average, not the symmetrically weighted four-bar numerator and denominator of the usual
Relative Vigor Index; on bars with open == close it is 0.
First output: once the signal exists, i.e. with the period + 3-th bar. Indicator::reset
clears both averages.
Implementations§
Trait Implementations§
Source§impl Indicator for RviEngine
impl Indicator for RviEngine
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 RviEngine
impl RefUnwindSafe for RviEngine
impl Send for RviEngine
impl Sync for RviEngine
impl Unpin for RviEngine
impl UnsafeUnpin for RviEngine
impl UnwindSafe for RviEngine
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