Four calculations that should not share one label
Use close-to-close change d = C(t) − C(t−1), gain g = max(d, 0), loss l = max(−d, 0), and bar volume V. TradingView documents ordinary RSI using Wilder averages of gains and losses. The weighted variants below are explicit public definitions for comparison, not a claim that every community indicator implements them.
- RMA uses an arithmetic-mean seed for the first N valid observations, then A(t) = [(N−1) × A(t−1) + x(t)] / N. Initial history therefore matters.
- Dividing both rolling weighted gain and loss averages by the same total volume cancels in their ratio. Smoothing those normalized averages afterward is a different operation and need not cancel.
- All displayed formulas require a positive denominator. A flat or zero-weight window has no directional ratio; this page returns unavailable instead of inventing a neutral observation.
| Calculation | Definition | What changes |
|---|---|---|
| Ordinary RSI | 100 × RMA(g, N) / [RMA(g, N) + RMA(l, N)] | Price changes determine the ratio; volume has no role. |
| Contribution-weighted, rolling | 100 × sum(V × g, N) / [sum(V × g, N) + sum(V × l, N)] | A large-volume move has more weight; the oldest contribution leaves after N bars. |
| Contribution-weighted, Wilder | 100 × RMA(V × g, N) / [RMA(V × g, N) + RMA(V × l, N)] | Weighted contributions decay recursively rather than dropping out at N bars. |
| Volume-smoothed RSI | sum(V × RSI, M) / sum(V, M) | Volume averages the last M ordinary RSI readings after their calculation. |