1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! The [`Indicator`] contract — the same streaming state machine `wickra-core`
//! uses, narrowed to a scalar `f64` output and no allocation.
/// A streaming technical indicator.
///
/// The contract mirrors `wickra-core`'s trait so a no-alloc indicator here is a
/// drop-in behavioural twin of its std counterpart:
///
/// - [`update`](Indicator::update) is called once per input point and is O(1) in
/// the series length. It returns `None` while the indicator is still warming
/// up and `Some(value)` once a defined value exists.
/// - [`reset`](Indicator::reset) clears all state, leaving the indicator exactly
/// as freshly constructed.
///
/// The associated [`Input`](Indicator::Input) is `Copy` (a price `f64` or a
/// [`Candle`](crate::Candle)) so the update path never clones or allocates.