Interface IIndicator<TSelf, TSample, TValue>
An immutable, self-folding indicator: consumes samples one at a time and
exposes its current value via ISignal<T>. Composes with
ISignal<T> rather than IAlgebra<TEvent, TState> or
IProcess<S,E> because the indicator's own state doesn't need
to be threaded as an explicit external parameter — this already is
the state.
public interface IIndicator<TSelf, TSample, TValue> : ISignal<TValue> where TSelf : IIndicator<TSelf, TSample, TValue>
Type Parameters
TSelfThe concrete indicator type, so Add(TSample) returns the same concrete type rather than the interface.
TSampleThe sample type consumed on each observation.
TValueThe indicator's current value type.
- Inherited Members
Methods
Add(TSample)
Fold one more sample in, returning the updated indicator.
TSelf Add(TSample sample)
Parameters
sampleTSampleThe new observation.
Returns
- TSelf
A new indicator instance reflecting
sample.