Indicators: RSI, MACD, moving averages and Bollinger Bands
Indicators are compressed views of price. The four most traders actually use: moving averages, RSI, MACD and Bollinger Bands, each worked step by step, with an RSI calculator; divergence, and why 'overbought' isn't a sell signal in a strong trend; what Brock, Lakonishok and LeBaron (1992) found about moving-average rules, and why the edge faded after 1986; and a small toolkit that won't fool you.
Facts reviewed Oct 2026
Every trading app comes loaded with a hundred indicators. Most traders who last use only a handful, usually some mix of the same four: moving averages, RSI, MACD and Bollinger Bands.
Each does one job. Used with judgement, they compress a lot of price information into something readable. Used mechanically, they produce confident nonsense.
Moving averages: smoothing the noise
A moving average (MA) is the average price over the last N periods, plotted as a line. Each day it moves forward one step. It smooths out daily noise, so you can see the trend underneath.
- Simple moving average (SMA): a plain average of the last N closes.
- Exponential moving average (EMA): gives more weight to recent prices, so it reacts faster.
Worked example: a 5-day SMA. A share’s last five closes were ₹100, ₹102, ₹101, ₹105 and ₹107.
- Add them: 100 + 102 + 101 + 105 + 107 = 515.
- Divide by 5: 515 ÷ 5 = ₹103.
- Next day, the share closes at ₹110. Drop the oldest close (₹100) and add the new one: (102 + 101 + 105 + 107 + 110) ÷ 5 = ₹105.
The average lags behind price: it rose ₹2 while price rose ₹3. That lag is the price of smoothing.
Common lengths:
| MA length | Typical use |
|---|---|
| 9 or 20 EMA | Short-term momentum, for intraday and swing trades |
| 50-day SMA | The medium-term trend on a daily chart |
| 200-day SMA | The long-term trend for shares and indices |
A simple rule many fund managers use: above a rising 200-day SMA, treat the trend as up. Below it, treat it with suspicion.
Crossovers, such as the “golden cross” (50-day crossing above the 200-day) and “death cross” (crossing below), are famous. But they’re late by design: they confirm trends already under way, rather than predicting them.
RSI: is the move stretched?
The Relative Strength Index (RSI), created by Welles Wilder in the 1970s, measures the speed of recent price changes on a 0–100 scale.
RSI = 100 − 100 ÷ (1 + RS), where RS = average gain on up days ÷ average loss on down days, usually over 14 periods.
Worked example. Over the last 14 sessions, a share’s average gain on up days was 1.5%, and its average loss on down days 0.5%.
- RS: 1.5 ÷ 0.5 = 3.
- RSI: 100 − 100 ÷ (1 + 3) = 100 − 25 = 75.
The usual reading:
- Above 70: “overbought”. Recent gains have been strong; a pullback becomes more likely.
- Below 30: “oversold”. Sellers may be tiring; a bounce becomes more likely.
That’s the beginner’s reading. The more useful one: in a strong uptrend, RSI can stay above 70 for weeks. Selling every share that touches 70 in a bull market is a good way to miss the best moves. RSI is more helpful for spotting changes in momentum than as a buy or sell trigger.
Divergence is worth learning. If a share makes a new high, but RSI makes a lower high, momentum is weakening even though price isn’t. That often comes before a pullback. The mirror image, a new price low with a higher RSI low, often comes before a bounce.
Average gains three times average losses give an RSI of 75, in the traditional 'overbought' zone. Equal gains and losses give 50. RSI approaches 100 slowly: even gains nine times the losses only reach 90.
The Nifty is in a strong uptrend, and its daily RSI has stayed above 70 for three weeks. What's the most sensible reading?
Overbought readings are common in powerful trends. RSI is more useful for spotting changes in momentum and divergences than as a standalone sell trigger.
MACD: two moving averages talking
MACD (moving average convergence divergence) measures the gap between two EMAs, usually the 12-day and 26-day. It has three parts:
- MACD line: the 12-day EMA minus the 26-day EMA. Positive means short-term momentum is above the longer-term trend.
- Signal line: a 9-day EMA of the MACD line.
- Histogram: the MACD line minus the signal line. Its bars grow and shrink as momentum speeds up or slows down.
Worked example. A share’s 12-day EMA is ₹512, and its 26-day EMA ₹500.
- MACD line: 512 − 500 = +12. Short-term prices are running above the longer trend.
- The signal line is +9. Histogram: 12 − 9 = +3.
- A week later, the MACD line is +11 and the signal line +11.5. The histogram is now −0.5: the MACD line has crossed below its signal line. Momentum is fading.
The most-watched signal is the MACD line crossing the signal line: crossing up is bullish, crossing down is bearish. Like other trend signals, these crosses are late. They work best with confirmation from other tools.
Bollinger Bands: a volatility envelope
Bollinger Bands wrap a moving average (usually the 20-day SMA) with two lines, two standard deviations above and below. The bands widen when volatility rises, and narrow when it falls.
Worked example. A share’s 20-day SMA is ₹500, and the standard deviation of its last 20 closes is ₹10.
- Upper band: 500 + 2 × 10 = ₹520.
- Lower band: 500 − 2 × 10 = ₹480.
- Band width: ₹40, or 8% of the average.
- A month later, the standard deviation has fallen to ₹4. The bands are now ₹492 to ₹508: a width of only 3.2%. That’s a squeeze.
Two main uses:
- Mean reversion. In a share moving sideways, a touch of the upper band tends to be pushed back towards the middle, and the reverse. This doesn’t work well in a trend.
- The squeeze. When the bands narrow unusually, volatility is low, and a bigger move often follows. The bands don’t say which way; only that a move is more likely.
In a strong uptrend, price often “rides” the upper band. That’s a sign of strength, not a sell signal.
A real case: do moving-average rules work?
In 1992, William Brock, Josef Lakonishok and Blake LeBaron published a famous study in the Journal of Finance. They tested simple moving-average and trading-range rules on the US Dow Jones index from 1897 to 1986. The rules appeared to work: buy signals were followed by higher returns than sell signals.
Then others looked again. In 1999, Ryan Sullivan, Allan Timmermann and Halbert White tested thousands of rules. They corrected for a simple fact: when you try enough rules, some will look good by luck. (Statistics & Probability for Finance calls this the multiple-testing problem.) They found the best rule’s edge didn’t carry on in the decade after 1986. And trading costs, which the early tests often ignored, would have eaten much of what remained.
The lesson: simple trend rules once captured something real, especially in less efficient markets. But edges that get published and widely used tend to fade. Treat any indicator rule as a hypothesis to test, not a law.
Combining indicators without fooling yourself
The most common beginner’s error is loading a chart with eight indicators. Then you look for the one that agrees with what you already want to do. This is confirmation shopping, and it’s dangerous.
A cleaner approach:
- One trend tool: a moving average (say, the 200-day) to set the direction.
- One momentum tool: RSI or MACD, to time entries.
- Volume: to confirm breakouts.
That’s enough. Each extra indicator adds noise faster than signal.
Remember: indicators are built from price. RSI, MACD and moving averages are all calculations on the same prices. They can’t tell you anything price itself can’t; they only show it differently. When price and an indicator disagree, price is usually right.
Going further: why indicators lag, and why that’s a trade-off. Every indicator that smooths price must look back. A 200-day average reacts slowly, so it gives few false signals, but it’s late to every turn. A 9-day EMA reacts fast, but whipsaws in sideways markets, flipping between buy and sell. No setting fixes both. Shortening the look-back buys speed at the cost of more false signals; lengthening it buys reliability at the cost of lateness. That’s why “optimising” an indicator on past data is so tempting, and so dangerous. The best setting for last decade’s market is rarely the best for the next. Choose a sensible, common setting, test it honestly, and accept that it will be wrong in some kinds of market.
Common mistakes
- Selling every RSI reading above 70. Strong trends stay “overbought”.
- Treating crossovers as early warnings. They confirm; they’re late.
- Reading a Bollinger squeeze as a direction. It says a move may come, not which way.
- Stacking indicators. They’re all built from the same prices.
- Optimising settings on past data. The best past setting rarely stays best.
Practice 1: Over 14 sessions, a share's average gain on up days was 0.8% and its average loss on down days 1.2%. What's its RSI?
- RS: 0.8 ÷ 1.2 = about 0.67.
- RSI: 100 − 100 ÷ (1 + 0.67) = 100 − 60 = 40.
Below 50: losses have been bigger than gains, but it isn’t “oversold”. Enter 0.8 and 1.2 in the calculator to check.
Practice 2: A 20-day SMA is ₹1,250 and the standard deviation is ₹25. Where are the Bollinger Bands? Price closes at ₹1,310. What does that suggest?
- Upper band: 1,250 + 2 × 25 = ₹1,300.
- Lower band: 1,250 − 2 × 25 = ₹1,200.
- A close at ₹1,310 is above the upper band.
In a sideways market, that might be stretched and likely to fall back. In a strong uptrend, it may be a sign of strength: price “riding the band”. The trend decides which reading fits.
Key takeaways
- Moving averages smooth price. The 200-day SMA is a classic long-term trend filter; crossovers are late.
- RSI = 100 − 100 ÷ (1 + RS). Divergences matter more than fixed 70/30 levels.
- MACD compares two EMAs; its histogram shows momentum speeding up or slowing down.
- Bollinger Bands = SMA ± 2 standard deviations. Squeezes come before bigger moves, without saying which way.
- Moving-average rules looked strong in Brock, Lakonishok and LeBaron (1992), but later tests found the edge faded after 1986. Use a small toolkit, and test before you trust.
Go deeper
- John Murphy, Technical Analysis of the Financial Markets: a full reference for the main indicators.
- Brock, Lakonishok and LeBaron (1992): Simple technical trading rules and the stochastic properties of stock returns, Journal of Finance.
- Zerodha Varsity: technical analysis module, with NSE examples.