SMA and EMA: Four Checks Before Interpreting a Crossover

A moving average summarizes a defined price series using a particular method and length. Its slope or crossover describes calculated relationships rather than knowing the next price. Verify type, source, timeframe and confirmation timing before comparing lines or evaluating a trading rule based on them.

A moving average summarizes a defined price series using a particular method and length. Its slope or crossover describes calculated relationships rather than knowing the next price. Verify type, source, timeframe and confirmation timing before comparing lines or evaluating a trading rule based on them.

An illustrative three-period SMA window
10, 12, 14Average equals 12
12, 14, 16Next average equals 14
New − old(16 − 10) ÷ 3 explains the change

The average updates after the new input replaces the oldest. It summarizes those observations.

BTKWIN.COM · EDUCATIONAL EXAMPLE

Check one: method, length and source

A simple moving average, or SMA, gives equal weight to values inside its window. An exponential moving average, or EMA, updates recursively with a specified weight on the newest input. The TradingView moving-average guide distinguishes methods and settings. Matching line color does not establish matching calculation.

Write a complete description, such as a three-bar hourly SMA of close from a named market with zero offset. Twenty periods on an hourly chart and twenty on a daily chart represent different windows. Missing bars can also make a period count differ from an assumed continuous elapsed time.

Check whether inputs are close, open, a price average or transformed chart values. Align the actual market, candle boundaries and source before treating differing numbers on two platforms as errors. The method can agree while its input series differs.

Calculate the SMA and explain why it moves

For hypothetical closes ten, twelve and fourteen, a three-period SMA is 36 ÷ 3 = twelve. Add a new close of sixteen and remove ten. The next window is twelve, fourteen and sixteen, producing an average of fourteen.

The change is also (new input − outgoing input) ÷ length: (16 − 10) ÷ 3 = two. This shows why the outgoing value matters as much as the incoming one. The indicator did not predict sixteen; it recalculated after that value entered.

A rising SMA does not mean the latest close rose. Consider an old window five, ten and twelve, averaging nine. Replace five with eleven. The new window ten, twelve and eleven averages eleven, even though the latest close fell from twelve to eleven. The incoming value still exceeded the outgoing one.

Hypothetical windowSumThree-period SMA
10, 12, 143612
12, 14, 164214
5, 10, 12279
10, 12, 113311

Calculate an EMA with an explicit previous value

A common EMA convention uses alpha = 2 ÷ (length + 1). New EMA equals current input times alpha plus previous EMA times (1 − alpha). The TradingView EMA explanation describes recursive weighting. Confirm the actual implementation and initialization rather than assuming every smoothed average uses this convention.

For length three, alpha is 0.5. With a hypothetical previous EMA of twelve and new price sixteen, the result is sixteen times 0.5 plus twelve times 0.5, or fourteen. If the next price is fourteen, the new EMA remains fourteen.

One matching result does not make SMA and EMA identical. Unlike the fixed SMA window, the prior EMA carries diminishing influence from older data. Reproducing a value can require the same starting point and initialization history. Check these before declaring a small difference a faulty calculation.

Check two: what crossed and when

A short average above a long average describes a current relationship. A new upward crossover also requires the defined earlier relationship, including treatment of equality. Price crossing one average is another condition and should not silently replace an average-to-average rule.

Suppose the short line is initially 98 and the long line 100, then their next completed values become 101 and 100.5. This hypothetical sequence demonstrates a change from below to above. It does not define an executable entry price, position size, exit or costs.

Because averages use observed inputs, a crossover can occur after substantial price movement. There is no fixed number of bars by which every crossover lags. Preserve the actual time of the condition rather than moving its marker to the beginning of the preceding trend.

Check three: ongoing inputs and visual offsets

If the current candle contributes an unfinished close, the average and crossover can change before confirmation. State whether the rule uses a momentary observation or completed data. An intrabar alert frequency and a close-confirmation requirement are different controls.

A daily average displayed on an hourly chart can also remain unconfirmed after an hour closes. Identify the timeframe supplying each input. The signal-timing guide explains why a historical final value may differ from what was known earlier.

A visual offset can move the line forward or backward without changing when its inputs became available. Record that offset and the original calculation time. A shifted plotted location is not evidence that a value was known at the earlier candle.

Check four: include costs and failed observations

Repeated crossings in a sideways range can generate many close-together actions under a proposed rule. A selected screenshot of a long trend does not show those cases. Report sample period, number of operations, rule version, drawdown and net results rather than only favorable crossings.

Assume a hypothetical one-unit purchase at 100 and sale at 100.3, with 0.2% commission on each side. Entry fee is 0.2 and exit fee 0.2006. Gross gain of 0.3 minus combined fees of 0.4006 gives −0.1006 before other execution effects. A higher sale price did not establish net profit.

If many length combinations were tested, retain the trial record instead of publishing only the best historical configuration. Evaluate later data not used to select it under unchanged definitions. That separation does not guarantee future success, but makes the selection process visible.

Practice the calculation before evaluating a strategy

Use a written closing-price series and compute short and long averages at each completed bar. Record the crossover condition separately from an assumed execution price. A rule cannot automatically fill at the exact close merely because that close was needed to detect it; observation and order processing are distinct stages.

Keep source data and configuration so another reader can reproduce the first differing row. Use the watchlist to organize the observed asset and the journal guide for decision and execution records.

A precise conclusion describes a confirmed relationship under named settings or explains an average’s change through its inputs. A claim that one crossover guarantees gains or one length is best for every market does not follow from the averaging formula.

Continue reading

English content and examples reviewed: 27 October 2026. Read the Arabic edition.

تامر طعمه
تامر طعمه
Articles: 484