pub struct SeriesEvents;Expand description
Helper functions for time series calculations and crossovers.
Implementations§
Source§impl SeriesEvents
impl SeriesEvents
Sourcepub fn rising(series: &Series<f64>, length: usize) -> bool
pub fn rising(series: &Series<f64>, length: usize) -> bool
Returns true if the series has been strictly increasing over the last length bars.
Sourcepub fn falling(series: &Series<f64>, length: usize) -> bool
pub fn falling(series: &Series<f64>, length: usize) -> bool
Returns true if the series has been strictly decreasing over the last length bars.
Sourcepub fn cross(a: &Series<f64>, b: &Series<f64>) -> bool
pub fn cross(a: &Series<f64>, b: &Series<f64>) -> bool
Returns true if series a crossed series b in either direction on the latest bar.
Sourcepub fn crossover(a: &Series<f64>, b: &Series<f64>) -> bool
pub fn crossover(a: &Series<f64>, b: &Series<f64>) -> bool
Returns true if series a crossed above series b (a[1] <= b[1] and a[0] > b[0]).
Auto Trait Implementations§
impl Freeze for SeriesEvents
impl RefUnwindSafe for SeriesEvents
impl Send for SeriesEvents
impl Sync for SeriesEvents
impl Unpin for SeriesEvents
impl UnsafeUnpin for SeriesEvents
impl UnwindSafe for SeriesEvents
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