Trend

Simple Moving Average (SMA)

The simple moving average explained: formula, how to read it, crossovers, support levels and ready-made SMA alerts for crypto and stocks.

5 min readUpdated

The simple moving average is the average closing price of the last N bars. It is the oldest and plainest trend tool there is: it irons out the noise of single candles and shows where the price has been on average, which tells you which way it is heading.

What it measures

Every bar has a close. The SMA adds up the last N closes and divides by N. When a new bar arrives, the oldest falls out of the window: the average "moves" along the chart.

where is the close of the current bar. Each of the N closes weighs exactly the same: a candle from 19 minutes ago matters as much as the one from a minute ago. That makes the SMA steady, and slow.

Try it

Drag the period slider: a short SMA hugs the price, a long one cuts through the swings. The second line is the slower SMA; where the two lines cross, the short-term trend overtook the long-term one.

PriceSMA 20SMA 50Example market · hover to read values
Price, SMA 20, SMA 50 on an example market: a rise, a sideways range, a sharp drop and a recovery.113.1

How Subtrigger computes it

CryptoUS stocks and ETFs
Periods20 and 50 bars20 and 50 bars
Bar1 minute5 minutes
Covers20 and 50 minutes100 minutes and about 4 hours
First valueright away on Binance, after N bars elsewhereafter N bars
Streamind:sma_20_1m@binance.miniticker:BTCUSDT:valueind:sma_20_5m@nasdaq.stocks:AAPL:value

The bar that is still forming counts as the last close, so the SMA moves with every tick.

How to read it

Direction. The slope of the SMA is the trend. A rising line means the average price keeps going up.

Position. The price above the SMA means buyers have been paying more than the recent average: bullish. Below it: bearish. The further away, the more stretched the move.

Support and resistance. In a steady trend the price often pulls back to the SMA and bounces. Many traders watch the 20 and the 50 for exactly that.

Crossovers. When a short SMA crosses above a long one, recent prices are higher than older ones: a classic "golden cross" in miniature. The opposite is a "death cross".

SignalWhat it suggests
Price crosses above SMAMomentum turned up
Price crosses below SMAMomentum turned down
SMA 20 crosses above SMA 50Short-term trend now up
SMA 20 crosses below SMA 50Short-term trend now down
Price far from SMAStretched move, pullbacks likely

Alert ideas

The price coming back above its 50-bar average after a dip:

Alert idea

BTCUSDT Price · Binance > BTCUSDT SMA 50 · 1m · Binance

Create this alert

A short-term trend change on a stock, with the fast average crossing the slow one:

Alert idea

AAPL SMA 20 · 5m > AAPL SMA 50 · 5m

Create this alert

Choosing the period

  • 20 follows the short-term swing. On 1-minute bars it is a 20-minute average: good for scalping and quick dips.
  • 50 is the "trend filter": slower, fewer false crosses.
  • Two of them together (20 and 50) give the crossover signal.

The longer the period, the later and the more reliable the signal. There is no best period: it is a trade between speed and noise.

Common mistakes

  • Trading every cross. Combine the cross with a trend filter: "price above SMA 20 and SMA 20 above SMA 50".
  • Expecting it to predict. The SMA describes the past; it confirms a trend, it does not call the top.
  • Comparing averages of different markets. An SMA is in price units: compare it with the price of the same market only.

For pros

  • Distance as a signal. The gap between price and SMA, in percent or in units of ATR, measures how stretched a move is. Mean-reversion traders fade large gaps; trend traders want the gap to stay positive.
  • Slope over price. For trend filters, the sign of the SMA's change is often more robust than the price/SMA cross.
  • Bands. Add standard deviations around the SMA and you get Bollinger Bands; measure the distance in standard deviations and you get the z-score.
  • EMA: the faster moving average.
  • MACD: the distance between two moving averages as an oscillator.
  • Bollinger Bands: the SMA with a volatility envelope.

FAQ

What is the difference between SMA and EMA?

The SMA weighs every bar in its window equally. The EMA weighs recent bars more, so it turns sooner after a change of direction.

Is SMA 50 on 1-minute bars the same as the daily 50-day average?

No. SMA 50 · 1m covers the last 50 minutes. The famous 50-day average covers 50 trading days. Same formula, very different horizon.

Why does the SMA move inside a minute?

The forming bar counts as the last close, so every new tick updates the average, exactly as on a trading chart.