3.4.3Indicators & Oscillators

Understand RSI and overbought - oversold

1,997 words9 min readdifficulty · medium

What is RSI?

Why it exists: Price alone doesn't tell you if a move is normal or extreme. RSI normalizes recent winning vs. losing days into a single number, making exhaustion visible.


Deriving the RSI Formula from First Principles

Step 1: Separate Gains and Losses

For each period ii, compute the price change: ΔPi=PiPi1\Delta P_i = P_i - P_{i-1}

Why? We need to know which days the bulls won and which days the bears won.

Split into:

  • Gain Gi=max(ΔPi,0)G_i = \max(\Delta P_i, 0) — positive change or zero
  • Loss Li=max(ΔPi,0)L_i = \max(-\Delta P_i, 0) — absolute value of negative change or zero

Why separate? RSI compares average winning strength to average losing strength. Mixing them would cancel out.

Step 2: Calculate Average Gain and Average Loss

Over the last nn periods (typically 14): Avg Gain=1ni=1nGi\text{Avg Gain} = \frac{1}{n}\sum_{i=1}^{n} G_i Avg Loss=1ni=1nLi\text{Avg Loss} = \frac{1}{n}\sum_{i=1}^{n} L_i

Why averages? A single big move might be a fluke. Averaging smooths out noise and reveals persistent momentum.

Step 3: Compute Relative Strength (RS)

RS=Avg GainAvg Loss\text{RS} = \frac{\text{Avg Gain}}{\text{Avg Loss}}

Why this ratio?

  • If RS = 3, bulls are winning 3× harder than bears → strong uptrend
  • If RS = 0.5, bears are winning 2× harder → strong downtrend
  • But RS is unbounded (0 to ∞), hard to interpret

Step 4: Normalize to 0–100 with the RSI Transform

Derivation of normalization: Start with: RSI=Avg GainAvg Gain+Avg Loss×100\text{RSI} = \frac{\text{Avg Gain}}{\text{Avg Gain} + \text{Avg Loss}} \times 100

Why? This gives the percentage of total movement that was upward.

Divide numerator and denominator by Avg Loss: RSI=Avg GainAvg LossAvg GainAvg Loss+1×100=RSRS+1×100\text{RSI} = \frac{\frac{\text{Avg Gain}}{\text{Avg Loss}}}{\frac{\text{Avg Gain}}{\text{Avg Loss}} + 1} \times 100 = \frac{\text{RS}}{\text{RS} + 1} \times 100

Rewrite: RSI=100RS1+RS=1001001+RS\text{RSI} = 100 \cdot \frac{\text{RS}}{1 + \text{RS}} = 100 - \frac{100}{1 + \text{RS}}

Why the final form? Computationally cleaner. When RS → 0, RSI → 0. When RS → ∞, RSI → 100.


Overbought and Oversold Zones

Why 70/30? Empirical convention. Wilder observed that RSI > 70 preceded reversals ~60% of the time in range-bound markets. Not magic, just a heuristic.

Visual intuition:

Figure — Understand RSI and overbought - oversold


Worked Example1: Calculate 3-Period RSI by Hand

Imagine closing prices: 100, 102, 101, 105, 104.

Period changes:

  1. 102 - 100 = +2 → Gain =2, Loss = 0
  2. 101 - 102 = -1 → Gain = 0, Loss = 1
  3. 105 - 101 = +4 → Gain = 4, Loss = 0

Averages (n=3): Avg Gain=2+0+43=2\text{Avg Gain} = \frac{2 + 0 + 4}{3} = 2 Avg Loss=0+1+03=0.333\text{Avg Loss} = \frac{0 + 1 + 0}{3} = 0.333

RS: RS=20.333=6\text{RS} = \frac{2}{0.333} = 6

RSI: RSI=1001001+6=10014.29=85.71\text{RSI} = 100 - \frac{100}{1 + 6} = 100 - 14.29 = 85.71

Why this step? RS = 6 means bulls won 6× harder. RSI = 85.71 → overbought zone, expect a pullback.


Worked Example 2: Interpreting Real Chart

Stock X: RSI climbs from 50 to 78over 5 days. Price rises 8%.

What's happening?

  • Buyers are piling in (average gains > average losses)
  • RSI > 70 → overbought territory

Two scenarios:

  1. Range-bound market: Likely reversal, sell signal
  2. Strong uptrend: RSI can stay overbought for weeks (see "RSI in trends" below)

Why this matters? Context determines signal quality. Blindly selling at70 in a bull market loses money.


Common Mistakes

Steel-man: In a powerful trend, RSI can ride 70–90 for months. The stock isn't exhausted, just strong.

Fix: Combine RSI with trend context. In uptrends, use 50as support. In ranges, use 70/30 as reversal zones.


Steel-man: RSI measures momentum (speed), not value. A stock at 10canbeoverbought,andastockat10 can be overbought, and a stock at 1000 can be oversold.

Fix: RSI = rate of change. Fundamental value is separate. A cheap stock falling fast has low RSI.


Steel-man: Intraday noise swamps the signal. 14 minutes isn't enough to establish momentum in many stocks.

Fix: Match period to your horizon. Day traders: 5–9 period RSI on 5-min charts. Swing traders: 14-period on daily. Long-term: 21+ period on weekly.


RSI in Different Market Conditions

| Condition | RSI Behavior | Trading Strategy | |-----------|------------------| | Range-bound | Oscillates 30–70 | Buy at30, sell at 70 | | Strong uptrend | Stays60–90, rarely dips to 30 | Buy dips to 50, ignore overbought | | Strong downtrend | Stays 10–40, rarely reaches 70 | Sell rallies to 50, ignore oversold | | Low volatility | Narrow range (45–55) | RSI useless, wait for breakout |

Why these differences? Trends shift the center of gravity. In uptrends, "normal" RSI is 60, not 50.


Divergence: The Power Move

Why divergence works: Price is the scoreboard, RSI is the engine. If the engine is failing while the scoreboard still climbs, the climb won't last.


Analysis: Price climbs 8%, but RSI drops from 70 →50. Each new high is weaker. Sellers are gaining ground. Expect reversal.

Why this step? Lower RSI highs = each rally is less convincing. When RSI breaks 50, downtrend confirmed.


Active Recall Flashcards

#flashcards/stock-market

What does RSI measure? :: The momentum of recent gains vs. losses, normalized to 0–100. High RSI = strong recent gains.

Standard overbought/oversold thresholds :: RSI > 70 = overbought, RSI < 30 = oversold. But context matters (trend vs. range).

Formula for Relative Strength (RS)
RS = (Avg Gain) / (Avg Loss) over n periods (usually 14).
RSI formula from RS
RSI = 100 - 100/(1 + RS). Normalizes RS from 0–∞ to 0–100 scale.
Why does RSI separate gains and losses?
To compare winning days vs. losing days directly. Mixing would cancel out the momentum signal.
Bullish divergence definition
Price makes lower lows, RSI makes higher lows. Momentum strengthening → potential reversal up.

Mistake: RSI > 70 always means sell :: Wrong in strong uptrends. RSI can stay 70+ for months. Use 50 as support in trends, 70 as reversal in ranges.

How to adjust RSI for day trading?
Use shorter period (5–9) on 5-min charts. 14-period daily is too slow for intraday.
What happens to RSI in a strong uptrend?
Stays 60–90, rarely dips to 30. "Normal" shifts from 50 to 60. Oversold doesn't reach 30.
RSI vs. price: what's the difference?
RSI = rate of change (momentum). Price = absolute level. A $1000 stock can be oversold if falling fast.

Recall Explain to a 12-Year-Old

Imagine you're tracking your friend's performance in daily video game matches. Some days they win, some days they lose. RSI is like asking: "Over the last 2 weeks, has my friend been winning way more than losing?"

If they won 10 out of 14 days and crushed it each time, their "momentum score" (RSI) would be really high—like 80 out of 100. That's "overbought" in stock terms: maybe they've been lucky and are due for a bad day.

If they lost 12 out of 14 days, their score would be low—like 20. That's "oversold": they've been beaten up so much, maybe they're due for a comeback.

RSI doesn't tell you if the game is easy or hard (that's the stock actual price or value). It just tells you: "Has this player been on fire or in a slump lately?"


Or: Relax SellingI**mmediately—check if it's a trend or just a hot streak.


Connections

  • 3.4.01-Introduction-to-Momentum-Indicators — RSI is a momentum oscillator; fits in this family
  • 3.4.04-Stochastic-Oscillator — Another overbought/oversold indicator, compares to high/low range
  • 3.4.07-Divergence-Trading — RSI divergence is a powerful reversal signal
  • 2.3.05-Support-and-Resistance — Use RSI with S&R levels for confluence
  • 3.2.02-Moving-Average-Crossovers — Combine RSI with MA to filter false signals in trends
  • 4.1.03-Risk-Reward-Ratio — Don't trade RSI alone; confirm with risk management

Concept Map

split into

split into

averaged

averaged

ratio numerator

ratio denominator

normalized 0 to 100

defines

above 70 signals

below 30 signals

suggests

suggests

RSI momentum oscillator

Price change delta P

Gain positive changes

Loss negative changes

Avg Gain over n periods

Avg Loss over n periods

Relative Strength RS

RSI equals 100 minus 100 over 1 plus RS

Overbought RSI over 70

Oversold RSI under 30

Pullback or reversal

Bounce or reversal

Hinglish (regional understanding)

Intuition Hinglish mein samjho

RSI ka matlab hai Relative Strength Index—yeh ek momentum indicator hai jo bata hai ki stock recent weeks mein kitna jeet raha hai ya haar raha hai. Socho kiek scoreboard hai: jab stock zyada din upar jata hai (gains), toh RSI 70+ ko touch karta hai, matlab "overbought"—buyers thak gaye hain, ab selling pressure aa sakta hai. Ulta, jab stock bahut gir raha ho (losses), RSI 30 ke neeche chala jata hai, matlab "oversold"—ab buyers vapas aa sakte hain.

Formula simple hai: pehle calculate karo average gain aur average loss (14 din ka usually), phir RS = avg gain / avg loss. RSI = 100 - 100/(1+RS). Is formula se0 se 100 ka scale milta hai. Trader log70 ke upar dekhke sochte hain "price zyada chadh gayi, correction ayega," aur 30 ke neeche dekhke sochte hain "bahut gir gayi, bounce milega."

Lekin ek badi mistake:agar market strong uptrend mein hai, toh RSI 70+ rehte hue bhi price aur badhegi. Toh sirf RSI mat dekho, trend bhi samajho. Range-bound market mein 70/30 ache reversal signals hain, lekin trending market mein RSI ko 50 level pe support ke tarah use karo. Divergence bhi powerful hai:agar price naye high bana raha lekin RSI lower high bana raha, toh trend weak ho raha hai, reversal ki tayyari karo.

Yeh indicator day trading se lekar swing trading tak kaam ata hai, bas time frame adjust karna padta hai. 1-minute chart pe 14-period RSI ka koi sense nahi, 5-9 period lo. Daily chart pe 14 perfect hai.

Test yourself — Indicators & Oscillators

Connections