pub struct Adl;Expand description
Accumulation/Distribution Line. No configurable parameters.
Implementations§
Trait Implementations§
Source§impl Indicator for Adl
impl Indicator for Adl
Source§fn calculate(
&self,
candles: &[Candle],
) -> Result<IndicatorOutput, IndicatorError>
fn calculate( &self, candles: &[Candle], ) -> Result<IndicatorOutput, IndicatorError>
Ports mfv.cumsum() where mfv = mfm * volume and
mfm = ((close - low) - (high - close)) / (high - low).
When high == low the multiplier is clamped to 0 (matching the
Python mfm[high == low] = 0 mask), so no divide-by-zero can occur.
Source§fn required_len(&self) -> usize
fn required_len(&self) -> usize
Minimum number of candles required before output is non-
NaN.
Mirrors Python’s implicit warm-up period used for validation.Source§fn required_columns(&self) -> &[&'static str]
fn required_columns(&self) -> &[&'static str]
Which OHLCV fields this indicator reads. Read more
Auto Trait Implementations§
impl Freeze for Adl
impl RefUnwindSafe for Adl
impl Send for Adl
impl Sync for Adl
impl Unpin for Adl
impl UnsafeUnpin for Adl
impl UnwindSafe for Adl
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