Summary
StochasticMomentumIndex is RTTA's streaming implementation of: Double-smoothed stochastic momentum index with signal line.
Update API
result = rtta.StochasticMomentumIndex().update(close, high, low)
The update(...) call consumes one observation using close, high, low. advance(...)
uses the same inputs when the caller wants to update state without materializing
a Python return value.
Theory Of Operation
StochasticMomentumIndex measures where close sits relative to the midpoint of
the recent high-low range, then double-smooths both the distance and the range
before normalizing. A signal EMA is also produced.
Recurrence
Let \(c_t,h_t,l_t\) be close/high/low, \(n\) the range window, and \(s_1,s_2,s\) the smoothers.
update(...) returns a result struct with fields smi, signal.
Implementation Notes
The recurrence is implemented in src/rtta/indicator.cpp in class StochasticMomentumIndex.
