◆ New — Strategy Validator, Code Fixer & Prop Compliance Checker are live. Try one free →
Home / Indicators / Moving Average Ribbon
Moving Averages indicator

Moving Average Ribbon

A stack of moving averages at increasing lengths plotted together, turning trend alignment and lag into one visual band.

Illustrative diagram — not live market data.

What it is

A moving average ribbon plots several moving averages of the same type — commonly eight EMAs or SMAs — at evenly spaced lengths on one chart, for example 10 through 80 in steps of 10. The result looks like a band or 'ribbon' that fans out when price trends and knots together when price consolidates. It is worth being honest about what a ribbon actually is: one calculation applied at several lags. Every line is the same average of the same price series, differing only in lookback, so the ribbon does not add new information beyond what a single moving average and raw price already contain — it re-displays that information in a way many people find easier to read at a glance. Read as a visualization aid, that is a fair use. Read as eight independent confirmations of a trend, it is an illusion of consensus. Like all moving-average tools, a ribbon is descriptive and lagging: it summarizes past price and predicts nothing. This is educational material, not financial advice, and trading involves risk of loss.

How it works

Choose an average type (EMA or SMA), a base length, and a step; the ribbon then computes the same average at base, base+step, base+2×step, and so on. Short-length lines hug price and react quickly; long-length lines are smoother and slower. Because every line responds to the same price changes at different speeds, the geometry of the ribbon encodes recent price behaviour: a sustained directional move drags the short averages away from the long ones, widening the ribbon and stacking the lines in length order (shortest nearest price). Consolidation lets the fast lines drift back toward the slow ones, compressing and tangling the ribbon. Expansion therefore describes a move that has already happened, and compression describes a contraction in recent movement — neither states what happens next. One implementation note for Pine Script: plot() calls must live at global scope, so a ribbon has a fixed number of plotted lines; the clean way to build one is to parameterize the base length and step and derive each length, rather than hard-coding eight unrelated copies of the same code. Calls to ta.ema should also sit at global scope so each series has a consistent bar-by-bar history.

How traders read it

Common settings

A common configuration is eight EMAs from 20 to 90 in steps of 10, or from 10 to 80. Some traders use SMAs for a steadier ribbon or exponential spacing (8, 13, 21, 34...) for more resolution near price. Type, base, and step all change every visual reading, and no combination is 'correct' — a tighter step mostly adds lines, not information.

Strengths

Pitfalls to watch

Pine v6 example

//@version=6
indicator("MA Ribbon Example", overlay = true)

baseLen = input.int(10, "Base Length", minval = 1)
stepLen = input.int(10, "Step", minval = 1)
src     = input.source(close, "Source")

// Same average at evenly spaced lengths; ta.* calls at global scope
ma1 = ta.ema(src, baseLen)
ma2 = ta.ema(src, baseLen + stepLen)
ma3 = ta.ema(src, baseLen + stepLen * 2)
ma4 = ta.ema(src, baseLen + stepLen * 3)
ma5 = ta.ema(src, baseLen + stepLen * 4)
ma6 = ta.ema(src, baseLen + stepLen * 5)
ma7 = ta.ema(src, baseLen + stepLen * 6)
ma8 = ta.ema(src, baseLen + stepLen * 7)

plot(ma1, "EMA 1", color = color.new(color.teal, 0))
plot(ma2, "EMA 2", color = color.new(color.teal, 12))
plot(ma3, "EMA 3", color = color.new(color.teal, 24))
plot(ma4, "EMA 4", color = color.new(color.teal, 36))
plot(ma5, "EMA 5", color = color.new(color.teal, 48))
plot(ma6, "EMA 6", color = color.new(color.teal, 60))
plot(ma7, "EMA 7", color = color.new(color.teal, 72))
plot(ma8, "EMA 8", color = color.new(color.teal, 84))

Pro tip: Before trusting anything a ribbon appears to show, ask whether a single moving average plus raw price would have shown the same thing — it usually would, because the ribbon contains no information beyond that. If you keep one, keep it as a lag visualizer: watching how long the slow lines take to agree with the fast ones is a genuinely useful, honest lesson in why moving-average tools confirm late. Educational only — ribbons describe the past, predict nothing, and all trading carries risk of loss.

Built an indicator from this? Run it through the Validator to catch look-ahead bias and repainting, or convert a strategy to Pine Script.

Educational only — not financial advice, not a recommendation to trade. No indicator is predictive; trading involves substantial risk of loss.

Catch the bug that compiles.Run auditGet Pro