Lesson 2 of 3About 2 min reading

How Common Indicators Are Built

What you will learn

  • Calculate simple and exponential moving averages and understand their lag.
  • Compute RSI and Bollinger Bands from their definitions.

Indicators re-express price

An indicator is a formula applied to past prices and sometimes volume. It adds no new information; it rearranges history to smooth noise, measure momentum or show volatility, always after the fact.

Every indicator needs parameters such as window length, so two charts with different settings can disagree. Common settings like 14 or 20 periods are popular conventions, not discoveries about markets.

Moving averages and MACD

A simple moving average is the mean of the last n closes. An exponential moving average weights recent prices more using a smoothing factor of 2 ÷ (n + 1). Longer windows are smoother but turn later.

MACD subtracts a 26-period exponential average from a 12-period one, then smooths that difference with a 9-period average called the signal line. It shows how fast short-term prices are moving relative to longer-term prices.

RSI and Bollinger Bands

RSI compares average gains with average losses over a window, commonly 14 periods. Relative strength RS is average gain divided by average loss, and RSI = 100 - 100 ÷ (1 + RS), so it ranges from 0 to 100.

Bollinger Bands draw lines two standard deviations above and below a 20-period average. Because standard deviation measures recent volatility, the bands widen when price swings grow and narrow when they calm.

Worked example: A hand calculation

Take five illustrative closes: 10, 11, 12, 11, 13. The 5-period simple average is 57 ÷ 5 = 11.4. For a 4-change RSI, the changes are +1, +1, -1 and +2, so average gain is 4 ÷ 4 = 1.0 and average loss is 1 ÷ 4 = 0.25. RS is 4, so RSI = 100 - 100 ÷ 5 = 80. Standard RSI also smooths its averages.

Check your understanding

A 20-period average is 50.0 and the standard deviation of closes is 1.5. Find the Bollinger Bands. What happens to their width if the standard deviation doubles?

Show answer and explanation

The bands are 50.0 ± 2 × 1.5, so upper is 53.0 and lower is 47.0, a width of 6.0. If the standard deviation doubles to 3.0, the bands become 56.0 and 44.0 and the width doubles to 12.0. Touching the upper band only shows price is far above its recent average; it does not predict a reversal.