Moving Averages: SMA, EMA, WMA and HMA compared

How each moving-average type is calculated, what changing the type actually does to the line, and why the period matters less than people think.

Moving Average is free on Basis — the button opens a live crypto chart with it already applied. No account, no trial and no limit on how many indicators you add.

Open the chart

What it measures

A moving average smooths price by averaging a window of it. Every variant answers the same question — what has price been doing lately — and differs only in how much weight it gives to recent bars against older ones.

That weighting is the entire difference between the types. A simple average treats a bar from twenty periods ago exactly as it treats today; an exponential one weights today far more heavily and never fully forgets anything; a weighted one ramps the weight linearly across the window.

The practical consequence is lag. More weight on recent bars means less lag and more noise, and every moving-average argument is really an argument about where on that line to sit.

How it is calculated

These are the steps Basis performs, verified against the published definition.

  1. 1

    Simple: sum the source over the period and divide by the period. Every bar in the window counts equally and an old bar leaves entirely when it falls out.

  2. 2

    Exponential: seed with the simple average of the first period, then blend each new bar in with a factor of 2/(period+1). No bar ever fully leaves; it only decays.

  3. 3

    Weighted: multiply each bar by its position in the window, so the newest carries weight equal to the period and the oldest carries one, then divide by the sum of those weights.

  4. 4

    Hull: take twice a weighted average of half the period, subtract a weighted average of the full period, and smooth the result over the square root of the period.

Settings

SettingDefaultRange
Length201 – 500
Typeema
Sourcecloseprice source

The period matters far less than the type and the timeframe. Twenty, fifty and two hundred are conventional because a great many people watch them, which on a self-fulfilling level is the best reason to use them. Changing the type changes the character of the line much more than changing the period does.

How to read it

  • The slope is the signal. A rising average means the window is rising, which is a stronger statement than price being above it.
  • Price crossing an average is the most-traded and least-reliable signal in charting, because in a range price crosses it constantly.
  • Two averages of different periods crossing is a slower and more meaningful event — it says the recent window has overtaken the longer one.
  • The distance between price and the average is a measure of extension, and it is what envelopes and Keltner Channels are built on.
  • On a market with a hard trend, the average acts as dynamic support because a great many people are watching the same one.

Where it misleads

Exponential averages have infinite memory, which means their value depends on how much history was loaded. Two charts showing a fifty-period EMA of the same instrument can differ if one started its calculation a thousand bars earlier than the other, and the difference is largest exactly when you have just loaded a short history. Simple and weighted averages have no such problem because their windows are finite. If an EMA disagrees between platforms, check how far back each one is computing from before assuming either is wrong.

Plot Moving Average on a live chart

Basis is free. Every indicator, every chart type, order flow, derivatives, screening and backtesting — no paid tier and no account needed to open a chart.

Open a chart with MA

Updated 2026-08-22 · Educational reference, not financial advice.