Indicators: moving averages, RSI and MACD
In short
Indicators are fixed formulas of past prices, so they add no new information. A moving average lags by an amount that can be calculated, and the exponential kind with the usual smoothing constant has the same average lag as the simple kind. Common indicators move closely together, and their usual settings are inherited habits, not derived values.
An indicator is a fixed formula applied to the price series. That sentence holds almost everything a reader needs, and the rest of this article follows from it. An indicator adds no data. It rearranges the closes already on the chart into a form that is easier to look at. Whatever information it shows was in the prices before the formula was applied. This article is part of the technical analysis series, which begins with Technical Analysis: What It Is and What the Evidence Says.
Practitioners know this and would not dispute it. The reason to be precise is that the words around indicators, such as signal, confirmation, divergence and overbought, suggest that something new has arrived. The arithmetic shows that nothing arrives.
The three constructions, precisely
Simple moving average. The plain average of the last n closes. Each of the n observations gets weight 1/n, and everything older gets zero.
Exponential moving average. A running weighted average. Today's value is a times today's close plus (1 minus a) times yesterday's value. The smoothing constant is usually set as a equals 2 divided by (n plus 1). That is what makes an EMA comparable to an n-day SMA. Weights shrink step by step and never reach zero.
Relative strength index. Over n periods, the average gain (periods without a gain count as zero) is divided by the average loss (periods without a loss count as zero) to give RS. The index is 100 minus 100 divided by (1 plus RS). Both averages use the running smoothing its creator specified rather than a plain mean. The result stays between 0 and 100. The usual period is 14, and the usual reference lines are drawn at 70 and 30. Neither the period nor the lines has a derivation. They were chosen by one author in the 1970s and have been copied since. MarketClue names them only because a reader will see them on most chart packages.
Moving average convergence divergence. The MACD line is a 12-period EMA minus a 26-period EMA. The signal line is a 9-period EMA of the MACD line. The histogram is the difference between the two. So it is a difference of two smoothers of the same series, smoothed again.
What the arithmetic of a moving average actually implies
A moving average is a lag, and the size of the lag can be calculated exactly. For an n-day simple moving average, the average age of the data in it is (n minus 1) divided by 2. For an exponential moving average with the usual smoothing constant, the average age is the same.
| Period n | SMA mean lag | EMA smoothing constant | EMA mean lag | EMA weight sitting in the last n observations |
|---|---|---|---|---|
| 10 | 4.5 days | 0.181818 | 4.5 days | 86.56% |
| 20 | 9.5 days | 0.095238 | 9.5 days | 86.49% |
| 50 | 24.5 days | 0.039216 | 24.5 days | 86.47% |
| 200 | 99.5 days | 0.009950 | 99.5 days | 86.47% |
Worked example
Worked example: the exponential average is not faster in the way it is usually described. The received wisdom is that an EMA responds more quickly than an SMA of the same length. Their mean lags are identical: 24.5 days for both at n equals 50, 99.5 days for both at n equals 200. What differs is the distribution of weight, not its center of gravity: the EMA puts more weight on the single most recent observation and keeps a thin tail of weight on old data indefinitely, and those two effects cancel exactly in the mean. A 200-day average is describing where price was roughly a hundred trading days ago, whichever construction is used, and that is a property of averaging rather than a defect. It is why an average that has just turned is reporting something that finished happening some time ago.
A key finding: the indicators are not independent of each other
Practitioners look for confluence, meaning several indicators agree. The question is what agreement between fixed formulas of the same input is worth. That can be measured.
The test used a synthetic driftless random-walk series of 2,000 daily observations with a daily standard deviation of 1.2%. The standard formulas above were computed on it. They were then correlated with each other and with the plain trailing return.
| Pair | Correlation |
|---|---|
| RSI(14) against the trailing 14-day return | 0.89 |
| RSI(14) less 50, against the MACD line (12, 26) | 0.80 |
| MACD line (12, 26) against the trailing 14-day return | 0.71 |
Worked example
Worked example: what confluence is measuring. RSI(14) correlates 0.89 with the plain trailing 14-day return, which means it is close to a rescaled restatement of how much the price has recently moved. RSI and the MACD line correlate 0.80 with each other, on data with no structure in it at all. Two indicators agreeing is therefore mostly the same observation arriving twice, not two independent confirmations, and the impression of corroboration comes from the fact that they are drawn in different panels with different scales. This is arithmetic, not a criticism of anyone's judgment. It follows from all three being functions of the same closes, and it holds regardless of whether prices contain any predictable structure.
Where the parameters come from, and what changing them does
The usual values are historical accidents. They are 12, 26 and 9 for MACD, 14 for RSI, and 50 and 200 for the widely watched averages. They are often attributed to a time when sums were done by hand on paper and weekly data made 5, 10 and 20 natural. None was derived, and none has since been shown to be a special choice.
Changing them has a large effect. The test used the same 2,000-day synthetic series and all 8,526 parameter pairs from the article on technical analysis and the evidence. It counted how many times a fast exponential average crosses a slow one. The number of crossings ranges from 9 at the slowest settings to 487 at the fastest, with a median of 27. The 12/26 pair produces 62 crossings, and the 50/200 pair produces 9. On a second synthetic path of the same kind the counts ran from 12 to 475, a ratio near 40, so the exact figures depend on the path while the large spread does not.
The consequence, and the reason no settings are recommended here. The parameter choice determines the number of events by a factor of more than fifty on this series, and by about forty on a second path. That is the mechanism behind the multiple-testing problem in the Technical Analysis article: an analyst who tries settings until the chart looks convincing has performed a search, and 8,526 candidates is enough for something convincing to almost certainly exist. Why Backtests Lie is the general statement of this; indicator parameters are its purest instance, because the search space is explicit and the searcher usually does not think of what they are doing as a search.
What the evidence says about indicators specifically
Moving-average rules are one of the five families in the 7,846-rule set that the major data-snooping study put together. That study adjusted the evaluation of the best rules for the size of the search: the best rule stayed significant in the original 1897–1986 sample, but its performance did not hold in the later 1987–1996 period. A widely cited positive result in the field is about pattern detection, not these three indicators. A widely cited survey of the research (Park and Irwin, 2007) found the balance of modern studies positive but heavily qualified. The positive results were concentrated in currency and futures markets and ran at least to the early 1990s.
None of that settles the question, and this article does not try to. But some things do not depend on the unresolved evidence at all. The indicators hold no information the prices did not already hold. Their lag can be calculated exactly. They correlate strongly with each other and with the trailing return. And their usual settings are inherited rather than derived. Those four facts hold whichever way the evidence is eventually read.
Check understanding
1 of 5
Over 14 periods a fictional series has an average gain of 1.2 and an average loss of 0.4 (periods without a gain or loss count as zero). By the article's formula, what is the RSI?
Frequently askedCommon questions
8 questions
What is a technical indicator?
A fixed formula applied to the price series. It adds no data. It rearranges closes already on the chart into a form that is easier to look at.
Is an exponential moving average faster than a simple one?
Not in the sense usually meant. At the usual smoothing constant their average lags are the same: 24.5 days for both at 50 periods, and 99.5 days for both at 200. The EMA weights the single most recent observation more heavily, but it keeps a thin, indefinite tail on old data. The two effects cancel in the mean.
How is RSI calculated?
The average gain divided by the average loss over the period, with periods without a gain or a loss counting as zero in the respective average, gives RS. The index is 100 minus 100 divided by (1 plus RS), which keeps it between 0 and 100. The averages use running smoothing rather than a plain mean.
What do the 70 and 30 lines on RSI mean?
They are usual reference lines with no derivation, chosen by one author in the 1970s and copied since. MarketClue names them because they appear on most chart packages. It attaches no meaning or action to them.
What is MACD made of?
A 12-period exponential average minus a 26-period one. A 9-period exponential average of that difference is the signal line, and the gap between them is the histogram. It is a difference of two smoothers of the same series, smoothed again.
If two indicators agree, is that meaningful confirmation?
Less than it seems. On a series with no structure at all, RSI correlated about 0.89 with the plain trailing 14-day return and about 0.80 with the MACD line in the worked example, and in the range of 0.76 to 0.87 with MACD across further paths. Two indicators agreeing is mostly the same observation arriving twice in different panels. That follows from both being formulas of the same closes.
Where do the standard settings come from?
They are often attributed to an era of hand calculation on weekly data. None of 12, 26, 9, 14, 50 or 200 was derived, and none has been shown to be a special choice.
Does it matter much which parameters are chosen?
A great deal. On one 2,000-day series, the number of crossings between a fast and a slow average ranges from 9 to 487 across the 8,526 possible pairs, a factor of more than fifty, and about forty on a second path. That range is also why trying settings until a chart looks convincing is a search, not an observation.
ReferencesWhere this comes from
- Sullivan, Timmermann and White (1999) — Data-Snooping, Technical Trading Rule Performance, and the Bootstrap, Journal of Finance 54(5) (accessed 2026-08-18)
- Park and Irwin (2007) — What Do We Know About the Profitability of Technical Analysis?, Journal of Economic Surveys 21(4) (accessed 2026-08-18)
- Lo, Mamaysky and Wang (2000) — Foundations of Technical Analysis, NBER Working Paper 7613 (accessed 2026-08-18)
Finished reading?
Mark it complete once the answer holds without scrolling back up.
Ask MarketClue AI about this lesson
The question carries this lesson as its context. MarketClue AI needs an account.
MarketClue does not provide financial advice.
Next on your list
After that
Educational and informational only — not investment advice, a recommendation, or an offer to buy or sell any security. Investing involves risk, including the possible loss of principal. Worked examples use fictional companies and figures.