# SMA

Source: https://tapehawk.com/docs/indicators/sma

> The simple moving average — the plain average of the last closing prices, with every candle counted the same.

Plain average of the last N candles. Every candle counts the same.

- Candles: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d, 1w, 1M
- Footprint: 1m, 5m, 15m, 1h
- Alerts: no

## What it shows

A line through the plain average of the last closing prices, drawn over the price. Every candle inside the
length counts the same, and a candle drops out completely once it is older than the length. The line is steady
and easy to reason about, and it turns later than an [EMA](https://tapehawk.com/docs/indicators/ema) of the same length.

![BTCUSDT 5-minute candles with an SMA drawn as a smooth line through the closes.](https://tapehawk.com/docs/shots/indicator-sma.webp)

The info bar names each copy by its length — `SMA (50)`.

## How to read it

* **Slope.** A rising SMA means the average close over its length is climbing; a falling one, dropping. A flat
  SMA that price keeps crossing describes a sideways market.
* **Price against the line.** Closes above a rising SMA describe an uptrend, closes below a falling SMA a
  downtrend.
* **Two lengths.** With a short and a long SMA on the panel, the short one crossing above the long one is the
  classic sign of a trend turning up, and crossing below, of one turning down. Such crosses come late by
  design: the average has to catch up with the move first.
* **Round numbers.** The 50 and the 200 are watched widely, so price often reacts near them.

## Parameters

| Setting | Control | What it does |
| --- | --- | --- |
| **Length** | Number | How many candles go into the average. Larger is smoother and slower to react. Common: 20, 50, 200. 1–1000 · default 50 |
| **Colour** | Colour |  |

**Length** is counted in candles, so an SMA of 50 covers 50 minutes on 1m and 50 days on 1d. Because each candle
drops out whole, the line can bend when a large candle leaves the window, even if price did nothing new — a
long length makes that less noticeable.

## Limitations

* It is computed from the candles loaded on the panel. The first candles of that history have no value until
  there are enough to fill the length.
* The newest candle's close is the live price, so the last point of the line moves until that candle closes.
* It follows the candle shape: on Heikin Ashi it uses the real closes, and on Renko, range bars and line break
  the closes of the bricks and bars drawn — see
  [Where an indicator can be drawn](https://tapehawk.com/docs/indicators#where-an-indicator-can-be-drawn).
* It prints no value: read it against the price axis.
* It takes no alert. Its **Alert** tab says it draws no signal; for a price level,
  set a [price alert](https://tapehawk.com/docs/alerts/price-alerts).
