pub struct IncrementalRsi { /* private fields */ }Expand description
Incremental RSI — O(1) per-tick, EMA-smoothed gains/losses.
Mirrors the batch rsi: the average gain and loss are tracked with an
IncrementalEma of the given period and combined as
100 - 100 / (1 + avg_gain / avg_loss) (RSI is 100 when the average loss is
zero). Like the other incremental structs it seeds from the first sample
(vs. the batch SMA warm-up), so warm-up values differ slightly from rsi
but converge — both are valid.
Implementations§
Trait Implementations§
Source§impl Clone for IncrementalRsi
impl Clone for IncrementalRsi
Source§fn clone(&self) -> IncrementalRsi
fn clone(&self) -> IncrementalRsi
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 moreAuto Trait Implementations§
impl Freeze for IncrementalRsi
impl RefUnwindSafe for IncrementalRsi
impl Send for IncrementalRsi
impl Sync for IncrementalRsi
impl Unpin for IncrementalRsi
impl UnsafeUnpin for IncrementalRsi
impl UnwindSafe for IncrementalRsi
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