pub struct ObvEngine { /* private fields */ }Expand description
On-Balance Volume (OBV): a running total of volume signed by the direction of the close.
Starting at 0, each bar adds its volume when the close rose against the previous close,
subtracts it when the close fell, and leaves the total unchanged when the close is equal. The
first bar has no previous close and contributes nothing.
First output: with the first bar. Indicator::reset returns the total to zero.
Implementations§
Trait Implementations§
Source§impl Indicator for ObvEngine
impl Indicator for ObvEngine
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 ObvEngine
impl RefUnwindSafe for ObvEngine
impl Send for ObvEngine
impl Sync for ObvEngine
impl Unpin for ObvEngine
impl UnsafeUnpin for ObvEngine
impl UnwindSafe for ObvEngine
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