pub struct DivergenceEvent {
pub kind: DivergenceKind,
pub previous_timestamp: i64,
pub pivot_timestamp: i64,
pub confirmed_timestamp: i64,
pub previous_price: f64,
pub pivot_price: f64,
pub previous_oscillator: f64,
pub pivot_oscillator: f64,
pub bars_between: usize,
pub quality_score: f64,
}Fields§
§kind: DivergenceKind§previous_timestamp: i64§pivot_timestamp: i64§confirmed_timestamp: i64§previous_price: f64§pivot_price: f64§previous_oscillator: f64§pivot_oscillator: f64§bars_between: usize§quality_score: f64Heuristic 0.0..=1.0 ranking of this candidate: 60% relative price+oscillator divergence
magnitude, 40% how centrally the pivot spacing falls within
[min_distance, max_distance]. Used to pick the winning candidate among several prior
pivots and to let consumers threshold weak divergences; not a calibrated probability.
Trait Implementations§
Source§impl Clone for DivergenceEvent
impl Clone for DivergenceEvent
Source§fn clone(&self) -> DivergenceEvent
fn clone(&self) -> DivergenceEvent
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 moreimpl Copy for DivergenceEvent
Source§impl Debug for DivergenceEvent
impl Debug for DivergenceEvent
Source§impl PartialEq for DivergenceEvent
impl PartialEq for DivergenceEvent
impl StructuralPartialEq for DivergenceEvent
Auto Trait Implementations§
impl Freeze for DivergenceEvent
impl RefUnwindSafe for DivergenceEvent
impl Send for DivergenceEvent
impl Sync for DivergenceEvent
impl Unpin for DivergenceEvent
impl UnsafeUnpin for DivergenceEvent
impl UnwindSafe for DivergenceEvent
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