Chapter 27 · Oscillators
Oscillators
RSI, MACD, Stochastic and the rest — formulas, worked numbers, and the single most expensive misreading in technical analysis.
RSI and the two thresholds
An oscillator measures rate of change rather than level. Most are bounded — RSI and Stochastic run 0 to 100 — which is what makes them look like they identify extremes. What they actually identify is that recent moves have been one-sided.
RSI, in full
| Step | Formula |
|---|---|
| Average gain | Sum of up-day changes over n ÷ n (default n = 14) |
| Average loss | Sum of down-day changes over n ÷ n |
| Subsequent periods (Wilder smoothing) | (Previous average × (n − 1) + current value) ÷ n |
| Relative strength | RS = Average gain ÷ Average loss |
| RSI | 100 − 100 ÷ (1 + RS) |
Worked: two RSI readings
- Average gain Rs 3.2, average loss Rs 1.6 → RS = 2.0 → RSI = 100 − 100 ÷ 3.0 = 66.7.
- Average gain Rs 1.0, average loss Rs 3.0 → RS = 0.333 → RSI = 100 − 100 ÷ 1.333 = 25.0.
- Note what the formula does at the edges: with no down days at all, average loss is 0, RS is infinite, and RSI is exactly 100. With no up days, RSI is exactly 0. The scale is a ratio, not a probability.
Four ways RSI is read, in ascending order of usefulness
- 1Thresholds — above 70 'overbought', below 30 'oversold'. The most cited and the least reliable.
- 2The centre line — RSI persistently above 50 is an uptrend, below 50 a downtrend. Duller and considerably more robust.
- 3Divergence — price makes a higher high, RSI makes a lower high. The highest-value reading of the four.
- 4Failure swings — RSI turns down before reaching 70 in an uptrend, or fails to reach 30 in a downtrend. Wilder's own preferred signal, and largely forgotten.
MACD, signal line and histogram
MACD
| Component | Formula |
|---|---|
| MACD line | EMA(12) − EMA(26) |
| Signal line | EMA(9) of the MACD line |
| Histogram | MACD line − Signal line |
Worked: EMA(12) = 428.4 and EMA(26) = 421.0, so the MACD line is +7.4. If the signal line is 5.9, the histogram is +1.5 — positive and, if it was +0.9 yesterday, rising. The histogram shrinking toward zero is the part worth watching, because it must reach zero before any crossover happens.
The rest of the family
| Indicator | Formula | Scale |
|---|---|---|
| Stochastic %K | (Close − Low(n)) ÷ (High(n) − Low(n)) × 100 | 0–100 |
| Stochastic %D | SMA(3) of %K | 0–100 |
| Williams %R | (High(n) − Close) ÷ (High(n) − Low(n)) × −100 | 0 to −100 |
| CCI | (Typical price − SMA) ÷ (0.015 × mean deviation) | Unbounded, mostly ±100 |
| ROC | (Price − Price(n periods ago)) ÷ Price(n) × 100 | Percentage |
| Momentum | Price − Price(n periods ago) | In rupees |
| TRIX | Rate of change of a triple-smoothed EMA | Around zero |
| Awesome Oscillator | SMA(5) of median price − SMA(34) of median price | Around zero |
Worked Stochastic: close 428, 14-day low 396, 14-day high 441. %K = (428 − 396) ÷ (441 − 396) × 100 = 32 ÷ 45 × 100 = 71.1. In plain language: the close sat 71% of the way up the last fortnight's range.
Overbought does not mean sell
This is the most expensive misreading in technical analysis, and it follows directly from the formula. RSI is high when recent moves have been mostly up — which is the definition of a strong uptrend. In a genuine trend, RSI can sit between 60 and 80 for weeks.
Selling the first 70 print in a new uptrend is how people exit at the start of the move that mattered. Wilder's own framing was that these levels flag a market worth examining, not a market to trade against.
Saved in this browser only — there is no account to create. Clearing your browser data clears your progress.
