pub trait Indicator: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn warmup_period(&self) -> usize;
fn compute(&self, candles: &[Candle]) -> Result<Series, IndicatorError>;
}Expand description
A technical indicator that computes a continuous numeric time series.
All indicators are pure functions - no I/O, no async, no side effects. This makes them easy to test, compose, and potentially compile to WASM.
For discrete classification outputs (e.g., VolumeAnomaly), use
ClassificationIndicator<T> instead.
Required Methods§
Sourcefn warmup_period(&self) -> usize
fn warmup_period(&self) -> usize
Minimum number of candles required before output is valid.