Moving Averages (SMA)

Moving averages are one of the most widely used tools in technical analysis. A moving average smooths out price data by calculating the average closing price over a set number of periods, creating a single flowing line on a chart. Traders use moving averages to identify trend direction, spot potential reversals through crossover signals, and find dynamic support and resistance levels. Engulfy tracks five SMA periods across every timeframe and alerts you when key crossovers occur.

Candlestick chart with 10, 20, 50, 100, and 200-period SMA lines overlaid, showing how shorter SMAs react faster to price changes

What Is a Simple Moving Average?

A Simple Moving Average (SMA) is calculated by adding up the closing prices for the last N periods and dividing by N. For example, a 20-day SMA adds up the last 20 daily closing prices and divides the total by 20. Each new day, the oldest price drops off and the newest price is added, so the average "moves" forward in time.

The formula is straightforward:

SMA = (Close₁ + Close₂ + ... + Close_N) / N

Common SMA periods include 10, 20, 50, 100, and 200. Shorter periods react faster to price changes but produce more noise; longer periods are smoother but lag further behind the current price. The choice of period depends on your trading timeframe and goals.

Why SMAs Matter

  • Trend identification — When price is above its SMA, the trend is generally considered up. When price is below, the trend is considered down. The slope of the SMA itself also indicates trend strength.
  • Dynamic support and resistance — SMAs act as moving support/resistance levels. In an uptrend, price often pulls back to the 20 or 50-day SMA and bounces. In a downtrend, price often rallies up to an SMA and gets rejected.
  • Smoothing noise — Day-to-day price fluctuations can be erratic. SMAs filter out the noise and reveal the underlying trend, making it easier to see the bigger picture.
  • Crossover signals — When a faster SMA crosses above or below a slower SMA, it generates a trading signal that many institutional and retail traders watch.

Common SMA Periods

Different SMA periods serve different purposes. Here are the five that Engulfy tracks:

PeriodCategoryTypical Use
10-dayShort-termDay traders and scalpers. Reacts quickly, lots of signals but more noise.
20-daySwing tradingSwing traders. Roughly one trading month. Often used as a pullback entry level.
50-dayMedium-termMedium-term trend gauge. Widely followed by both retail and institutional traders.
100-dayIntermediateBridges the gap between the 50 and 200. Useful for confirming trend shifts.
200-dayLong-term / InstitutionalThe most watched SMA globally. Institutional benchmark for bull vs. bear market.

SMA Crossovers

A crossover occurs when a faster (shorter-period) SMA crosses above or below a slower (longer-period) SMA. A bullish crossover happens when the fast SMA moves above the slow SMA, suggesting upward momentum. A bearish crossover happens when the fast SMA drops below the slow SMA, suggesting downward momentum.

Engulfy tracks three crossover pairs, each carrying different weight:

Crossover PairBullish NameBearish NameRelative Weight
10 / 20Short-term bullish crossShort-term bearish crossLower
20 / 50Medium-term bullish crossMedium-term bearish crossModerate
50 / 200Golden CrossDeath CrossHighest

The Golden Cross (50-day SMA crossing above the 200-day SMA) is perhaps the most famous crossover signal in all of technical analysis. It is widely covered in financial media and watched by institutional investors. The Death Cross is its bearish counterpart — the 50-day SMA crossing below the 200-day SMA. These signals carry the most weight in Engulfy's scoring because longer-period crossovers are rarer and tend to reflect more significant trend changes.

MA Alignment

Beyond individual crossovers, the alignment (or "stacking order") of all five SMAs tells you how strong the current trend is. In a perfectly bullish trend, the fastest SMA sits on top and the slowest on the bottom:

Max Bullish Alignment:

10 SMA > 20 SMA > 50 SMA > 100 SMA > 200 SMA

Max Bearish Alignment:

200 SMA > 100 SMA > 50 SMA > 20 SMA > 10 SMA

Engulfy scores MA alignment on a scale from max bearish to max bullish based on the stacking order of all five SMAs. The more adjacent pairs that are in bullish order (faster above slower), the higher the alignment score. A score near the middle indicates a mixed or transitioning market, while extreme scores suggest a strong, well-established trend.

MA alignment is a useful confirmation tool. For example, a Golden Cross is more meaningful when the overall MA alignment score is already positive and rising, because it means the shorter-term averages have already been leading the way higher.

How Engulfy Detects the SMA Crossovers

  • Engulfy calculates 5 SMAs (10, 20, 50, 100, 200-period) for each ticker on every timeframe.
  • A crossover signal fires when the fast SMA was below the slow SMA on the previous bar AND is now above it (bullish cross), or vice versa (bearish cross).
  • Three crossover pairs are tracked: 10/20 (short-term), 20/50 (medium-term), and 50/200 (long-term Golden/Death Cross).
  • Longer-period crossovers carry more weight in Engulfy's scoring — a Golden Cross is weighted significantly higher than a short-term 10/20 cross.
  • MA Alignment is scored based on how many adjacent SMA pairs are in bullish vs. bearish order across all five periods.

Engulfy detects crossovers on daily, weekly, monthly, and quarterly timeframes for stocks, crypto, and forex.

Limitations & Criticisms

  • Lagging indicator: Because SMAs are calculated from past prices, they always lag behind the current price. By the time a Golden Cross fires, the initial move may already be well underway. This is the most common criticism of moving averages.
  • Whipsaws in sideways markets: In choppy, range-bound markets, the fast and slow SMAs repeatedly cross back and forth, generating a series of false signals called "whipsaws." Each signal reverses shortly after it fires, leading to frustration and losses if blindly followed.
  • Equal weighting: SMA treats every bar's close equally — the price from 200 days ago has the same influence as yesterday's close. Some traders prefer the Exponential Moving Average (EMA), which gives more weight to recent prices and reacts faster.
  • Efficient Market Hypothesis (EMH) debate: Academic proponents of the EMH argue that moving average strategies should not consistently outperform a buy-and-hold approach because all publicly available information is already priced in. However, numerous studies and practitioners demonstrate that trend-following strategies based on moving averages have produced positive risk-adjusted returns over long periods.

Reference: John Murphy, Technical Analysis of the Financial Markets (1999), Chapter 9 — provides the definitive treatment of moving averages, crossover strategies, and their strengths and weaknesses.

FAQ