Candleread
6Grade 6: Indicator Lab
Technical Analysis + Price Action · RSI Done Right

The RSI formula, derived

Derive the RSI formula from average gain and average loss using Wilder's smoothing.

3 min read+25 XPLesson 21 of 96
Start reading

Lesson path

Technical Analysis + Price Action

RSI Done Right

Lesson 21 of 9622%
Lesson 21 of 96Technical Analysis + Price ActionRSI Done Right

Today's tiny win: make one idea click.

Derive the RSI formula from average gain and average loss using Wilder's smoothing.

Learn itSpot itPass the check

What RSI is actually measuring

RSI stands for Relative Strength Index. J. Welles Wilder Jr. designed it in 1978, and the math has not changed since. Despite the name, RSI is not measuring one asset's strength against another. It is measuring an asset's recent up moves against its own recent down moves. That's it. The output is a single number between 0 and 100 that updates with every new candle close.

Wick shows a calculator labeled RSI with the formula 100 minus 100 divided by 1 plus RS, teaching how average gain versus average loss becomes one number.RSI = 100 - 100 ÷ (1 +RS)RSI
Wick saysRS is average gain divided by average loss, and RSI turns it into a 0 to 100 score.

Here's the formula in plain steps. Step one: over the last 14 candles (the default period), separate every candle's price change into either a gain or a loss. An up candle contributes its close-minus-previous-close to the gain bucket. A down candle contributes the absolute value of its loss to the loss bucket. Step two: average each bucket. Step three: divide average gain by average loss. That ratio is called RS, or relative strength. Step four: feed RS into 100 minus 100 divided by 1 plus RS. The output is RSI.

There is one detail that trips up most beginners: Wilder used his own smoothing method, not a simple moving average. After the first 14 candles, each new average is calculated as ((13 times yesterday's average) plus today's value) divided by 14. This makes RSI smoother and slower than a plain rolling average would. Almost every charting platform uses Wilder smoothing by default. If yours has a setting called 'RMA' or 'Wilder', that is the original.

Wick points at a chalkboard: 13 times the old average plus today's value, divided by 14, teaching the Wilder smoothing that makes RSI slow and smooth.Wilder update(13 × old average+ today's value)÷ 14
Wick saysAfter 14 candles, each new average keeps 13 parts old and 1 part new.

What does each end of the scale mean? RSI at 100 would require zero down candles in the lookback window, which almost never happens. RSI at 0 would mean zero up candles, equally rare. Most of the time RSI lives between roughly 20 and 80. The extremes are interesting precisely because they are rare. Now you know why the number behaves the way it does. The next nine lessons in this chapter use that foundation.

Wick stands by a half-circle meter with rare zones at 0 and 100 and the needle in the middle, labeled mostly 20 to 80, teaching where RSI usually lives.Rare at 0Rare at 100Mostly 20 to 80?
Wick saysRSI rarely hits 0 or 100, because that needs every candle to go one way.

Recap: RSI = 100 - (100 / (1 + RS)), RS = average gain / average loss, default lookback 14, smoothed using Wilder's method.

Knowledge check

Answer before moving on.

0 / 3 answered

1. What does the 'RS' in RSI actually represent?

2. After the first 14 candles, how is the average gain updated each new candle?

3. Why does RSI almost never touch 0 or 100?

Lesson handoff

Pass the check before saving.

Use the knowledge check first. After you pass it, this card turns into the save-and-continue handoff.