Indicators · Trend

Moving averages (SMA, EMA, WMA, Hull)

A moving average smooths prices over a number of bars to show the underlying direction. Oyticker offers four kinds: simple (SMA), exponential (EMA), weighted (WMA) and Hull (HMA), on any price source. They describe the trend; they always lag it.

What it's for
  • Smooth prices to show the underlying direction of the trend.
  • Use the slope, the price's position and crossovers as trend filters.
  • Watch the most followed averages (20, 50, 200) as dynamic support and resistance in trends.
Pane
On the price chart
Plan
Every plan
Settings
Type, length (1–500), source
Default
SMA 20 of the close

Calculation

SMA(n)  = (x₁ + … + xₙ) / n                         the last n values
EMA(n)  = α·x + (1 − α)·EMA[1],  α = 2 / (n + 1)     started from the SMA of the first n values
WMA(n)  = (n·x + (n−1)·x[1] + … + 1·x[n−1]) / (n(n+1)/2)
HMA(n)  = WMA( 2·WMA(n/2) − WMA(n), √n )            n/2 and √n rounded down

x is the chosen source: close by default, or open, high, low, hl2, hlc3, ohlc4. These are the definitions used by TradingView's built-in averages.

TypeCharacter
SMAEqual weights; smooth, slowest to turn
EMAMore weight on recent prices; turns sooner, follows price more closely
WMALinearly decreasing weights; between SMA and EMA
HullDesigned by Alan Hull to reduce lag while staying smooth; can overshoot at turns

How to read it

  • Slope: a rising average describes an uptrend; flat means no trend.
  • Price position: price above a rising average is the normal state of an uptrend; pullbacks to it are often bought in strong trends (the 20- and 50-period averages are the most watched).
  • Two averages: the faster one above the slower one confirms an uptrend. On daily charts, the 50-day crossing above the 200-day is called a golden cross, the opposite a death cross.
SMA 20 and EMA 20 on a decline and recovery; the EMA turns up first
After the low, the EMA 20 (blue) turns up a few bars before the SMA 20 (orange) and stays closer to price during the advance: more weight on recent prices means faster reactions, and more sensitivity to noise.

Case study: the golden cross is late by design

SMA 50 crossing above SMA 200 more than 100 bars after the market low
The SMA 50 (blue) crosses above the SMA 200 (orange) more than 100 trading days after the market low, when price is already more than 25% above that low.

A 200-day average describes almost a year of prices, so a crossover with it confirms a change of trend long after it started. That is its purpose: a slow, robust filter for the long-term regime (many investors only hold an asset above its 200-day average), not an entry timing tool.

Case study: whipsaws in a range

Sideways market crossing its SMA 20 many times
In a sideways market the SMA 20 goes flat and price crosses it again and again: each cross would have been a losing signal for a trend-following rule.

Moving averages are trend tools. When the average is flat and price keeps crossing it, the market is ranging and crossover signals should be ignored; oscillators like the RSI or range tools work better there.

Add it in Oyticker

  1. Click Indicators, choose Moving average.
  2. Click its name in the legend to set the type, length and source; add it several times for several averages (each gets its own color).

Limits

  • Every average lags: shorter lengths and EMAs lag less but give more false signals.
  • No length is “the right one”; widely watched values (20, 50, 100, 200) matter because many participants use them.

Charts in this guide use simulated prices generated for illustration; levels and outcomes shown are examples, not observations of a real market. Educational content only, not investment advice.