Trend · TickAtlas Learn

Simple Moving Average (SMA)

The Simple Moving Average smooths price data by calculating the average closing price over a specified number of periods. It is one of the most fundamental trend-following indicators.

10 min readUpdated 2026-03-21Trend
SMA · quick spec
GET /v1/indicator ?symbol=EURUSD&indicator=SMA_20&timeframe=H1
Family
Trend
Series
Periods 10 · 20 · 50 · 100 · 200
Best timeframes
H1 · H4 · D1
Last updated
2026-03-21

TL;DR

  • SMA is a trend indicator used in technical analysis
  • Price above SMA indicates bullish trend; price below indicates bearish. Crossovers between different SMA periods generate buy/sell signals.
  • Best timeframes: H1, H4, D1
  • Skip to API docs
Understand

What is Simple Moving Average?

The Simple Moving Average smooths price data by calculating the average closing price over a specified number of periods. It is one of the most fundamental trend-following indicators.

Calculate

How SMA is calculated

formula
SMA = (P₁ + P₂ + ... + Pₙ) / n

where P = closing price, n = number of periods

Available periods: 10, 20, 50, 100, 200
Interpret

How to interpret SMA

Price above SMA indicates bullish trend; price below indicates bearish. Crossovers between different SMA periods generate buy/sell signals.

Apply

Trading strategies using SMA

Strategy 1: Golden Cross / Death Cross

When the 50-period SMA crosses above the 200-period SMA (golden cross), it signals a bullish trend. The opposite (death cross) signals bearish.

Entry rules

Buy when SMA(50) crosses above SMA(200). Sell when SMA(50) crosses below SMA(200).

Exit rules

Exit on the opposite crossover signal or when price closes significantly below the SMA(50).

Strategy 2: SMA Bounce Strategy

In trending markets, price often pulls back to key SMAs before continuing. The SMA(20) and SMA(50) act as dynamic support/resistance.

Entry rules

In an uptrend, buy when price bounces off SMA(20) or SMA(50) with a bullish candlestick pattern.

Exit rules

Exit when price closes below the SMA used as support, or target a 2:1 reward-to-risk ratio.

Combine

Combining SMA with other indicators

SMA works best when combined with complementary indicators:

  • SMA + Exponential Moving Average: Combine for stronger confluence signals
  • SMA + MACD: Combine for stronger confluence signals
  • SMA + Bollinger Bands: Combine for stronger confluence signals
Timeframes

SMA across different timeframes

SMA works across all 7 timeframes but performs best on H1, H4, D1 for most trading styles.

H1H4D1

Learn about all 7 timeframes

Query

Accessing SMA via the TickAtlas API

GET https://tickatlas.com/v1/indicator

Python example

python
import requests

url = "https://tickatlas.com/v1/indicator"
headers = {"X-API-Key": "YOUR_API_KEY"}
params = {
  "symbol": "EURUSD",
  "indicator": "SMA_20",
  "timeframe": "H1"
}

response = requests.get(url, headers=headers, params=params)
data = response.json()
print(data)

Sample response

200 OK
{
  "success": true,
  "data": {
    "symbol": "EURUSD",
    "indicator": "SMA_20",
    "timeframe": "H1",
    "value": 1.0851,
    "updated_at": 1711548000,
    "server_time": "2024-03-27T14:00:00+00:00",
    "bid": 1.0856,
    "ask": 1.0857
  }
}
Avoid

Common mistakes to avoid

  • Using SMA as a sole entry signal without trend confirmation
  • Applying short-period SMAs to noisy lower timeframes
  • Ignoring the lag inherent in all moving averages — SMA reacts slower than EMA
FAQ

Frequently asked questions

What is the best SMA period for day trading?

For day trading, SMA(20) and SMA(50) are popular on H1 charts. The SMA(200) on H1 is widely watched as a major trend filter. The best period depends on your strategy and market conditions.

What is the difference between SMA and EMA?

SMA gives equal weight to all periods, while EMA gives more weight to recent prices. EMA reacts faster to price changes but may generate more false signals. SMA is smoother and better for identifying long-term trends.

How to access SMA data via API?

Use GET /v1/indicator?symbol=EURUSD&indicator=SMA_20&timeframe=H1 with your API key. Available periods: SMA_10, SMA_20, SMA_50, SMA_100, SMA_200.

Continue learning

From learning to building

Put SMA to work in your application.

Sign up with $2.50 of starting credit and query pre-calculated SMA data across 7 timeframes, from M1 to D1.