pub struct VolumeSignalIndicator { /* private fields */ }Expand description
Volume anomaly indicator.
Classifies each candle’s volume relative to a rolling mean of the prior
lookback candles. Returns None until sufficient history is available.
Implements ClassificationIndicator<VolumeSignal>.
Implementations§
Source§impl VolumeSignalIndicator
impl VolumeSignalIndicator
Sourcepub fn new(config: VolSignalConfig) -> Result<Self, IndicatorError>
pub fn new(config: VolSignalConfig) -> Result<Self, IndicatorError>
Create a new VolumeSignal indicator.
§Errors
Returns InvalidParameter if lookback is 0 or elevated_threshold is not positive.
Sourcepub fn compute(
&self,
candles: &[Candle],
) -> Result<Vec<Option<VolumeSignal>>, IndicatorError>
pub fn compute( &self, candles: &[Candle], ) -> Result<Vec<Option<VolumeSignal>>, IndicatorError>
Convenience wrapper — delegates to the ClassificationIndicator trait impl.
Callers that hold a concrete VolumeSignalIndicator can call .compute()
without importing the trait.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VolumeSignalIndicator
impl RefUnwindSafe for VolumeSignalIndicator
impl Send for VolumeSignalIndicator
impl Sync for VolumeSignalIndicator
impl Unpin for VolumeSignalIndicator
impl UnsafeUnpin for VolumeSignalIndicator
impl UnwindSafe for VolumeSignalIndicator
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