Summary
AccumulativeSwingIndex is RTTA's streaming cumulative sum of Wilder's Swing
Index. Each bar contributes one SI increment; the indicator returns the running
total, which tracks net directional swing pressure over the full history.
Update API
value = rtta.AccumulativeSwingIndex(limit=0.5).update(open, high, low, close)
The first bar seeds previous OHLC and returns 0.0. Every subsequent bar adds
the current Swing Index increment to the running total.
Theory Of Operation
Welles Wilder's Swing Index measures how much of a bar's open/close structure represents a genuine swing relative to the prior bar, scaled by a limit (the largest expected price change). Accumulative Swing Index (ASI) is simply the indefinite sum of those increments, analogous to how AD or OBV accumulate bar contributions. Positive ASI growth suggests net bullish swing structure; negative growth suggests net bearish structure.
RTTA composes ASI from an internal SwingIndex member and a scalar accumulator.
Recurrence
Let \(O_t, H_t, L_t, C_t\) be open, high, low, close. Let \(\ell\) be limit
(default \(0.5\)). Seed previous OHLC on the first bar and set \(ASI_0 = 0\).
Define absolute gaps versus the previous bar:
The denominator factor \(R_t\) is chosen by the largest of \(A_t, B_t, C'_t\):
The returned value is \(ASI_t\).
Implementation Notes
The recurrence is implemented in src/rtta/indicator.cpp in
class AccumulativeSwingIndex, which owns a SwingIndex member and accumulates
its scalar output. See also SwingIndex.
