🏆 December race · $200 in weekly prizes · starts 1 December · beat our commentators & the AlgoTrader — freeJoin free →
$200in prizesThree prizes. Every week.★ #1 $25★ #2 $15★ #3 $5+ PRO free for all of 2027 for the month’s #1Join free →
← Education for New Starters// Learn · Trend

What is a moving average?

By InvestMuse2 min read

A moving average is the average price over a fixed number of recent periods, recalculated every period so that the line moves along with the chart. It smooths out bar-to-bar noise so the underlying direction is easier to see: when the line slopes up, prices in the window have been rising on balance, and when it slopes down, they have been falling. Moving averages are the building block of many other chart tools, including MACD and Bollinger Bands, which is why they are usually the first indicator people learn.

crossing comes after the turnPriceshorter average: follows closelylonger average: smoother, later
A jagged price line with a shorter moving average hugging it and a longer, smoother average lagging behind; the two cross after the price turns

How it is calculated

A simple moving average (SMA) adds up the closing prices of the last N periods and divides by N, while an exponential moving average (EMA) gives each new close a weight of 2 ÷ (N + 1) and carries the rest over from its previous value, so recent prices count more. N is a choice, not a law. Common lengths are 20 periods for a short view, 50 for a medium one and 200 for a long one, and the same arithmetic works on hourly, daily or weekly bars.

How traders read it

The first thing people look at is the slope: rising, flat or falling. The second is where the price sits relative to the line. A price holding above a rising average is usually described as an uptrend, and a price below a falling one as a downtrend. Chartists also compare two averages of different lengths. When a shorter average crosses above a longer one, the event is often called a golden cross, and the opposite a death cross. Both are labels for a change in the balance of the window, not instructions.

The common mistake

The usual mistake is forgetting that every moving average lags. Because it is built from past prices, it turns only after the price has already turned, and the longer the window, the later the turn. In a choppy, sideways market this produces a string of crossings that reverse soon after they appear, each one looking meaningful at the time. A shorter length reduces the delay but lets more noise through, and no setting removes that trade-off.

What it cannot tell you

A moving average cannot forecast where the price goes next; it summarises where the price has been. It knows nothing about earnings, news or liquidity, and it treats a quiet session and a frantic one the same way if they close at the same price. The popular lengths are conventions that many people watch, which can make them matter at times, but there is nothing special about the numbers themselves. It describes the trend that is already there, and nothing more.

Try it on real data

Open a chart and switch the indicator on, or filter the market by it in the screener. Both are free; what you see is data, not a call to act.

Sources and default settings

  • John J. Murphy, Technical Analysis of the Financial Markets (New York Institute of Finance, 1999)
  • How this lesson is made: written with AI assistance from the sources above, then checked by our editorial rules (formula and default settings against the originator, no buy/sell language, no dates or prices) before it is published.