Concept
MA of MA
MA of MA is a Trend concept. The Library holds 1 implementation — a working definition you can pull into Quant.
Top MA of MA indicator
The top custom implementation, built on the original standard MA of MA formula.
1 total
This MA of MA implementation is strategy-ready: open it in Quant, set your rules, and it backtests automatically.
What is an MA of MA?
An MA of MA is double smoothing: a moving average computed not on price but on the output of another moving average. Feeding one filter into another compounds their effects. Noise that survives the first pass is attenuated again, the composite weighting is the convolution of the two windows (an SMA of an SMA, for instance, produces the center-weighted triangular MA), and the lags roughly add. The construction generalizes freely: smooth three times, mix different average types, or average an indicator line that is itself already smoothed.
Two opposite design goals use it. The first accepts the extra lag to buy stability: double- and triple-smoothed baselines barely wiggle, so their slope changes and crossings fire rarely, and a line crossing its own smoothed copy (the MACD signal-line grammar) acts as a turn detector on the first average. The second exploits the algebra to remove lag: DEMA, TEMA, and T3 combine EMA-of-EMA terms so the compounded lag largely cancels. Either way, smoothness is not foresight; a very smooth line confirms trends late.
Cascaded smoothing has a long pedigree. Robert G. Brown's double exponential smoothing from the 1950s smooths the smoothed series to track trends in demand data. In charting, Jack Hutson introduced TRIX, the one-bar rate of change of a triple-smoothed EMA, in Technical Analysis of Stocks & Commodities in the early 1980s; William Blau's True Strength Index (1991) double-smooths momentum rather than price; and Patrick Mulloy's DEMA and TEMA (1994) turned the cascade against itself, combining its terms so the lags largely cancel. The triangular moving average, an SMA passed over an SMA, is the most familiar named special case.
Thinking in filters explains the feel of any stack. Each pass multiplies the frequency responses, damping high-frequency noise twice over and leaving center-heavy composite weights, which is why cascades look rounded and serene next to a single EMA of comparable total lag. Engineered filters buy similar smoothness with less delay, but the plain cascade survives because it is transparent and trivial to build from whatever averages a platform offers.
How to build an MA of MA
Any two averages can be stacked:
- 1Compute the first moving average on price, for example a 20-period EMA.
- 2Feed that series, not price, into a second average; the types and lengths need not match.
- 3Plot both lines: the second is visibly smoother and turns after the first, and the gap between them widens as a trend accelerates.
- 4Read crossings of the pair as slope-change signals on the first average, and the second line's own slope as the slow regime read.
How it's calculated
A second moving average applied to the output of a first, trading extra lag for a much smoother line.
Shown with simple averages; either pass can use any moving average type, and mixing types is common.
An SMA of an SMA with each pass near half the total length gives the triangular moving average, while DEMA uses the double EMA as 2 × EMA - EMA(EMA) to cancel the added lag.
The double SMA spans an effective window of n1 + n2 - 1 bars, so expect roughly doubled lag versus a single pass.
How traders use it
- As a slow baseline: a double-smoothed average serves as the trend reference that price or a faster average must cross, cutting whipsaw at the cost of later entries.
- As a turn detector: crossing a moving average with a smoothed copy of itself approximates detecting when the first average changes slope, which can fire earlier than waiting for two independently computed averages to cross.
- As a building block: TRIX (the rate of change of a triple-smoothed EMA), signal lines on oscillators, and lag-corrected averages like DEMA and TEMA are all MA-of-MA constructions with different arithmetic on top.
- As a tamer of rough series: inputs too jagged for one pass, such as volume, breadth counts, or raw oscillator values, are routinely smoothed twice before rules are applied to them.
- As a stable input to slope rules: an MA slope filter applied to a double-smoothed line changes state rarely, which suits trend regime labels meant to hold through noise.
- As the slow leg of moving average crossovers: crossing a fast average of price against a smoothed copy of a slower one trades later entries for fewer whipsaws.
MA of MA vs related constructions
MA Ribbon: A ribbon runs many averages of price in parallel at different lengths; an MA of MA runs averages in series, one feeding the next. The ribbon fans out to show trend maturity; the cascade collapses to a single, extra-smooth line.
EMA: One pass of geometric decay, the unit usually being cascaded. A second EMA roughly doubles the lag while damping noise twice over: a pure smoothness-versus-delay trade.
Ehlers SuperSmoother: An engineered low-pass filter built to deliver strong smoothing with less lag than stacked conventional averages. Cascading is the brute-force route to a quiet line; the SuperSmoother is the designed one.
Concept family
Trend
100 concepts mapped · 100 in the Library
MA of MA FAQ
Does smoothing a moving average twice make it more accurate?
No, only smoother. Double smoothing removes more noise but adds lag, so the line describes where the trend was with more confidence and more delay. Whether that helps depends on the job: it suits slow regime filters and signal lines, and it hurts anything that needs a fast reaction to new prices.
How much lag does an MA of MA have?
Roughly the sum of the component lags. A simple N-period average sits about (N-1)/2 bars behind price, so a 20-period SMA smoothed by another 20-period SMA trails by roughly 19 bars. The additivity is exact for simple averages in cascade and approximately right for recursive ones like the EMA.
Why do indicators use a signal line instead of a second faster average?
A signal line is a smoothed copy of the indicator itself, so it trails the exact series it is compared against. Crossings therefore flag turns in that specific line rather than a relationship between two separately computed averages, which is usually the more direct question when timing an indicator's own reversals.
What is the difference between an EMA of an EMA and DEMA?
An EMA of an EMA is the plain cascade, smoother and slower than either component. DEMA computes twice the single EMA minus the EMA of the EMA; the subtraction cancels most of the compounded lag, producing a line faster than a plain EMA. Same ingredients, opposite goals.
Can you average three or more moving averages in a row?
Yes; nothing limits the depth, and library scripts run N-tuple stacks of many average types. Each extra pass adds lag and serenity together, so beyond two or three passes the line describes last month more than this week. Lag-cancelling combinations such as TEMA and T3 are the exception, built to go deep without slowing down.
Does the order of the two averages matter?
Not for linear filters: a 10-period SMA followed by a 20-period SMA gives the same result as the reverse order, because convolution commutes. Order starts to matter once a nonlinear element, such as a median filter or an adaptive average, enters the chain.
Turn MA of MA into a trading strategy.
Take the implementation from this page into Quant, then build on it, backtest it on real data, and keep refining it with AI.
