Home›Learn›Technical Analysis›What is a moving average?

What is a moving average?

A moving average is an indicator that calculates the average price of an asset over a specific number of periods and plots that average as a line on the…

Technical Analysis2 minUpdated 14 Aug 2026
What is a moving average?

What it is

A moving average is an indicator that calculates the average price of an asset over a specific number of periods and plots that average as a line on the chart. As new price data arrives, the oldest data point drops off and the newest is added — the average "moves" with time.

Moving averages are among the oldest and most widely used technical indicators. They smooth out price fluctuations to show the underlying trend direction more clearly.

The two main types

Simple Moving Average (SMA)

Calculates the straight arithmetic average of closing prices over the specified period. A 20-period SMA adds up the last 20 closing prices and divides by 20. All periods are weighted equally.

Exponential Moving Average (EMA)

Gives more weight to recent prices than older prices, making it more responsive to recent price changes. A 20-period EMA reacts faster to new price data than a 20-period SMA. Most EA developers prefer EMAs for trend detection because of this responsiveness.

Common uses in trading and EAs

  • Trend direction: Price above the moving average = bullish trend. Price below = bearish trend.
  • Dynamic support and resistance: The moving average line itself often acts as support in an uptrend and resistance in a downtrend.
  • Moving average crossover: A faster MA crossing above a slower MA is a bullish signal ("golden cross"). A faster MA crossing below a slower MA is bearish ("death cross"). This is one of the most common EA entry signals.
  • Trend strength: The steeper and more separated the moving averages, the stronger the trend.

Why it matters for EAs

Moving average crossovers are among the simplest and most commonly programmed EA entry conditions. The 50/200 MA cross, the 9/21 EMA cross, the 10/50 EMA cross — these are widely used as both entry triggers and trend filters. The MACD indicator itself is built from moving averages. Understanding how MAs work helps you understand what an EA is actually detecting when it uses them.

Common misconceptions

  • No moving average period is universally correct. The "best" moving average period depends on the timeframe, the currency pair, and the strategy. There is no magic number. Long periods (200) are better for major trend identification; shorter periods (9, 20) are better for shorter-term signals.
  • Moving averages lag price. By definition, a moving average is based on past prices. It will always confirm a trend after it has already begun, not before. This is a feature, not a bug — it filters out noise — but it means MA signals come with some delay.

The Karnek note

Karnek is read-only monitoring for MetaTrader - it watches every account you run, live on one dashboard, and alerts you the moment something stops. It never trades and never asks for a trading password.

See it in Karnek: monitor your strategy live with Karnek.

More in Technical Analysis →

Written and reviewed by the Karnek Research team. Last updated August 2026.

Educational content only - not financial advice. Past performance does not predict future results. Trading carries significant risk.

Karnek

See your results, proven.

Connect an account read-only and watch every metric on this page update live from your terminal. Your first account is free.