RSI summarises the balance between upward and downward price changes. Understanding its calculation helps explain a signal, but a complete strategy also needs execution, exits, position sizing and a test plan.
Start with price changes
For a closing-price RSI, gain is max(close(t) − close(t−1), 0) and loss is max(close(t−1) − close(t), 0). Let G and L be their Wilder-smoothed averages. A common initial seed is the arithmetic mean of the first N changes, requiring N+1 closes. Later values use the recurrence below. N=14 means 14 chart bars, not necessarily 14 days; record source, timeframe, seed and warm-up.
RS = G / L
RSI = 100 − 100 / (1 + RS)
G(t) = ((N − 1) × G(t − 1) + gain(t)) / N
L(t) = ((N − 1) × L(t − 1) + loss(t)) / N
A synthetic 14-period update
Suppose the already initialised averages are G=1.20 and L=0.80. RS is 1.5 and RSI is 60. If the next close is 2 price units lower, gain=0 and loss=2. With N=14, the updated G is 1.1142857 and L is 0.8857143, giving RSI≈55.71. These invented inputs demonstrate the calculation; they are not market observations or strategy returns.
| Measure | Before | After |
|---|---|---|
| Smoothed gain G | 1.2000 | 1.1143 |
| Smoothed loss L | 0.8000 | 0.8857 |
| RSI | 60.00 | 55.71 |
Read 30 and 70 in context
The familiar 30 and 70 levels label relatively weak or strong recent momentum. They do not set a timetable for a reversal: RSI can stay elevated during an advance or depressed during a decline. If L=0 and G>0, the limiting RSI is 100; G=0 with L>0 gives 0. When both are zero, document the platform’s undefined/flat-series convention rather than silently assuming every implementation agrees.
Write a rule that can be reproduced
“RSI is low” is incomplete. A research rule might require the previous completed bar to have RSI≤30 and the latest completed bar RSI>30. Then specify whether execution is simulated on the following bar, how existing positions are handled, and the exact exit and size rules. This is an example hypothesis, not a recommendation or a claim that this threshold is profitable.
Check the test, not just the signal
Use only information available at the decision time. Allow enough warm-up and compare indicator values against a reference implementation. Include entry and exit fees, spread and slippage; record rejected or ambiguous fills. Separate parameter development from an untouched test period. Compare nearby settings and market regimes, reporting drawdown, exposure and trade count alongside net results.
Keep indicator education separate from evidence
Save the data source, rules, costs and code version with each experiment. A chart annotation or this arithmetic example does not establish a trading edge. The linked QuantDesk demo contains saved UBS/ULTIMATE GUARD reports; those are not RSI-strategy results. Continue with the getting-started guide to turn the question into a full research specification.
A useful RSI signal starts with a reproducible calculation and becomes a strategy only when its decision, execution and risk rules are explicit.