SMA
How It Works
The SMA is computed by adding the closing prices for the chosen look‑back period and dividing the sum by the number of periods. For a 10‑day SMA, the formula is:
SMA₁₀ = (Close₁ + Close₂ + … + Close₁₀) / 10
Each new day drops the oldest price and includes the most recent close, so the average “moves” forward in time. The resulting line is plotted on the price chart; when the price sits above the SMA, the market is generally considered bullish, and when it falls below, bearish. Longer periods (e.g., 50‑day or 200‑day SMA) produce smoother lines that highlight major trends, while shorter periods (e.g., 10‑day) respond more quickly to price changes.
Why It Matters for Traders
SMA provides a clear visual reference for trend direction and potential support or resistance levels. Many traders watch for crossovers: when a short‑term SMA crosses above a long‑term SMA, it may signal a buying opportunity; the opposite crossover can suggest a sell signal. Because the SMA is based solely on price, it avoids the lag introduced by volume‑based indicators and works across all asset classes offered by STB Provider, including forex pairs, commodities, and indices. Additionally, SMA values are often used as inputs for more complex strategies, such as Bollinger Bands or moving‑average convergence divergence (MACD), making it a foundational building block in technical analysis.
Example
Assume a stock’s closing prices over five days are: 100, 102, 101, 103, and 104. The 5‑day SMA for day five is:
SMA₅ = (100 + 102 + 101 + 103 + 104) / 5 = 510 / 5 = 102
On day six, the price closes at 105. The new 5‑day SMA drops the first day’s price (100) and adds the latest close:
SMA₅ (day 6) = (102 + 101 + 103 + 104 + 105) / 5 = 515 / 5 = 103
The SMA rose from 102 to 103, reflecting the upward price momentum. If the 5‑day SMA were plotted alongside a 20‑day SMA, a crossover where the 5‑day line moves above the 20‑day line could be interpreted as a short‑term bullish signal.
Key Takeaways
- SMA calculates the average closing price over a set period, smoothing price data to reveal trend direction.
- It is a lagging indicator; longer periods smooth more but react slower to price changes.
- Traders use SMA crossovers and price‑relative positioning to generate buy or sell signals.
- The tool is readily available on MetaTrader 5 via STB Provider and works across all major markets.