What is a moving average?

A moving average (MA) is a line that connects average prices calculated one after another, and it is often referred to simply as "the MA." Charting software uses it to smooth out short-term price swings so that price changes over a period are easier to see.

A moving average is usually overlaid on the price chart and is a type of technical indicator. It is not another trade price, nor is it a future quote: every point comes from price data that has already been recorded. The "moving" in the name means that each time a new period's price is added, the average is recalculated and the line on the chart extends forward.

There are two common methods: a simple moving average treats the prices of the most recent periods equally, while an exponential moving average gives newer prices a larger share. Below, we first look at how each one is calculated and then compare how they differ.

Simple moving average: every recent period has the same weight

A simple moving average (SMA) adds up the prices of the most recent periods and divides the total by the number of periods. Each period's price takes up the same share of the average; this share is also called its weight. Each time a new period's price is added, the software brings in the latest period and drops the oldest one, so the calculation range moves forward by one step.

The example below uses closing prices, meaning the last trade price at the end of each period. Suppose an asset's closing prices for its first five periods are $8, $10, $12, $16, and $10. Using a three-period SMA gives the following results:

Point of calculation Closing prices included ($) Three-period SMA ($)
End of period 3 8, 10, 12 (8 + 10 + 12) ÷ 3 = 10
End of period 4 10, 12, 16 (10 + 12 + 16) ÷ 3 ≈ 12.67
End of period 5 12, 16, 10 (12 + 16 + 10) ÷ 3 ≈ 12.67

In period 5 the price falls from $16 to $10, yet the moving average does not decline, because the $10 that is added is the same as the $10 that is dropped. How a moving average changes depends on the whole set of inputs, not just on whether the latest price rose or fell compared with the previous period.

Only when the averages from each period are connected does the line on the chart take shape. The three periods used here only illustrate the calculation; they are not a recommended setting.

Exponential moving average: newer prices carry more weight

An exponential moving average (EMA) does not recalculate an equally weighted average over a fixed window each time. Instead, it combines the latest price with the previous period's EMA in fixed proportions to arrive at the new value step by step. A common way to calculate it is:

Current EMA = latest price × smoothing factor + previous EMA × (1 − smoothing factor)

The smoothing factor is the share of the current calculation assigned to the latest price, and it is commonly set as 2 ÷ (number of periods + 1). The calculation needs a starting value at the outset; a common approach is to use the SMA of the first few periods.

Using the same hypothetical prices, the smoothing factor for a three-period EMA is 2 ÷ (3 + 1) = 0.5. Taking the period 3 SMA of $10 as the starting value:

  • Period 4 EMA = 16 × 0.5 + 10 × 0.5 = $13;
  • Period 5 EMA = 10 × 0.5 + 13 × 0.5 = $11.5.

How SMA and EMA differ

Both methods can be calculated from the same set of prices. The difference lies in how weight is assigned to newer and older prices, and how older prices drop out of the calculation.

Comparison Simple moving average (SMA) Exponential moving average (EMA)
Weight of newer and older prices The same for every period in the window The latest price takes the smoothing-factor share; the older a price, the smaller its share
How older prices drop out They stop counting as soon as they leave the window Their influence fades period by period rather than disappearing abruptly
How it is calculated The average of the most recent periods is recalculated each time It is built step by step from the previous period's EMA
Affected by the starting value? No Yes, by the starting value and by how much historical data is included

In the example above, the price falls from $16 to $10 in period 5: the three-period SMA stays at about $12.67, unchanged, while the three-period EMA falls from $13 to $11.5. The EMA responds more visibly to the latest price, but that does not mean it predicts the next period more accurately.

A "three-period EMA" also does not mean that only the three most recent prices are used: the influence of older prices has already been carried into the previous period's EMA and fades period by period, rather than disappearing as soon as a price falls outside the latest three periods. If charting software uses a different starting value or a different length of historical data, its EMA values may also differ.

"20 periods" does not necessarily mean 20 days

One "period" of a moving average usually corresponds to one candlestick on the chart, a shape that records trade prices over a span of time; that span can be a day, an hour, or another length. The number of periods is a setting of the moving average calculation, while the chart time frame determines how long each period is. On a daily chart, a 20-period SMA averages the prices of the latest 20 daily candlesticks; on a one-hour chart, it averages the prices of the latest 20 one-hour candlesticks. The two cover different time spans.

With the same method and price input, a smaller number of periods usually makes a moving average more sensitive and leaves in more short-term swings; a larger number of periods usually makes it smoother but slower to respond to price changes. For an EMA, increasing the number of periods also lowers the smoothing factor, giving the latest price a smaller share of the current calculation.

When comparing two moving averages, you also need to confirm whether each is an SMA or an EMA, what the price input is, and which market the price data comes from. Trade prices differ somewhat between trading markets, so moving averages calculated from each market's prices may also differ. Closing prices are a common input, but a moving average can also be calculated from other data, such as opening prices. The number "20" by itself is not enough to explain why two lines are the same or different.

Lag, crossovers, and price position

A moving average describes how the selected data changes after smoothing, not where the price must go next. It lags because older prices are still part of the calculation: when the price has already turned, the moving average may still be heading in its original direction, and the longer the period, the more noticeable this delayed response usually is.

Analysts also watch for crossovers between the price and a moving average, or between moving averages of different periods. A crossover means that their previous positions above and below each other have switched. Such crossovers are also a kind of technical indicator "signal", and they are not a buy or sell conclusion in themselves. When the price moves back and forth within a range, crossovers may occur repeatedly without forming a sustained new direction.

Likewise, a price above the moving average only means it is higher than the average calculated from this set of data; it does not prove the asset has become "expensive." A price below the moving average does not prove the asset has become "cheap" either. A moving average does not verify a project's use, security, or asset value. Its role in technical analysis is to organize historical prices, and it cannot replace judgment on other questions.

Learn more about the Relative Strength Index, technical indicators, technical analysis, and candlestick charts, or return to the cryptocurrency glossary.

References

Zřeknutí se odpovědnosti
Tento obsah je poskytován jen pro informativní účely a může se týkat produktů, které nejsou ve vašem regionu k dispozici. Jeho účelem není poskytovat (i) investiční poradenství nebo investiční doporučení, (ii) nabídku nebo výzvu k nákupu, prodeji či držbě kryptoměn / digitálních aktiv ani (iii) finanční, účetní, právní nebo daňové poradenství. Držba kryptoměnových/digitálních aktiv, včetně stablecoinů, s sebou nese vysokou míru rizika, a tato aktiva mohou značně kolísat. Měli byste pečlivě zvážit, zda jsou pro vás obchodování či držba kryptoměn / digitálních aktiv s ohledem na vaši finanční situaci vhodné. Otázky týkající se vaší konkrétní situace prosím zkonzultujte se svým právním/daňovým/investičním poradcem. Informace (včetně případných tržních dat a statistických informací), které se zobrazují v tomto příspěvku, slouží výhradně k informativním účelům. I když jsme přípravě těchto dat a grafů věnovali řádnou péči, nepřebíráme žádnou odpovědnost za případné faktické chyby, opomenutí nebo názory, které v nich vyjádřené.

Digitální aktiva podléhají volatilitě a nejsou pojištěna. Nejedná se o finanční/investiční poradenství. Ne všechny produkty jsou nabízeny ve všech oblastech. Platí výjimky a obchodní podmínky a ujednání.

© 2026 OKX. Tento článek může být reprodukován nebo šířen jako celek, případně mohou být použity výňatky tohoto článku nepřekračující 100 slov za předpokladu, že se jedná o nekomerční použití. V rámci jakékoli reprodukce nebo šíření celého článku musí být také výrazným způsobem uvedeno: „Tento článek je © 2026 OKX a je použit se svolením.“ Povolené výňatky musí odkazovat na název článku a uvádět autorství, například „Název článku, [jméno autora, je-li uvedeno], © 2026 OKX“. Část obsahu může být generována nástroji umělé inteligence (AI) nebo s jejich asistencí. Z tohoto článku nesmí být vytvářena odvozená díla ani nesmí být používán jiným způsobem.

Související články

Zobrazit více
trading-foundations-20-thumbnails-jpg-2026-11-25/quote-currency

What is total supply?

**Total supply is the total number of units of a crypto asset that have been created so far and still exist after the burned units are subtracted.** It includes units that are still locked, not yet re
27. 11. 2026
trading-foundations-20-thumbnails-jpg-2026-11-25/order-book

What is a technical indicator?

**A technical indicator is a set of values or a curve calculated from market data such as price and trading volume according to a defined formula.** It organizes trading records into results that are
27. 11. 2026
trading-foundations-20-thumbnails-jpg-2026-11-25/market-depth

What is technical analysis?

**Technical analysis (TA) is a family of analytical methods that study historical prices, trading volume, and other market trading data to identify trends and patterns.** A pattern here is a shape for
27. 11. 2026
trading-foundations-20-thumbnails-jpg-2026-11-25/bid-price

What is a support level?

**A support level is a price zone marked in technical analysis where the price, when falling, has previously slowed, paused, or rebounded, so analysts watch whether a similar reaction will occur again
27. 11. 2026
trading-foundations-20-thumbnails-jpg-2026-11-25/ask-price

What is a resistance level?

**A resistance level is a price area marked in technical analysis where price rises have previously slowed, paused or turned lower, so analysts watch whether a similar reaction appears again.** It des
27. 11. 2026
trading-foundations-20-thumbnails-jpg-2026-11-25/price-impact

What is the Relative Strength Index?

**The Relative Strength Index (RSI) is a technical indicator that compares the amounts by which an asset's price has risen and fallen and expresses the result as a reading from 0 to 100.** It describe
27. 11. 2026
Zobrazit více