How it works
A ribbon is not a new calculation. It is several moving averages of increasing length plotted at once, so that instead of reading one line you read the shape of a group. The information is in the geometry: the order of the lines, the spacing between them, and whether that spacing is growing or collapsing.
The intuition is that each length is a different participant. The 10-period average roughly represents what a short-term trader paid, the 50 what a swing trader paid, the 200 what a long-term holder paid. When all of them are stacked in order — fastest on top, slowest at the bottom, all rising — every horizon is in profit and every horizon agrees. That alignment is what people mean by a healthy trend, and it is far more informative than any single crossover, because it cannot be produced by one noisy bar.
Two dynamics do most of the work. Expansion, where the lines fan apart, means the move is accelerating and the shorter horizons are pulling away from the longer ones; it usually accompanies the strongest part of a trend. Compression, where the ribbon flattens into a narrow braid, means the horizons have converged on the same price — nobody has an edge, volatility is usually low, and the market is coiling. Compression resolves into expansion sooner or later, but the ribbon says nothing about direction, only that the current equilibrium is fragile.
Compared with a single moving average, the ribbon trades precision for context. It gives no clean entry level and no unambiguous signal bar; what it gives is an immediate visual read on whether the trend structure is intact, deteriorating or absent, which is exactly the question you want answered before applying an oscillator or a breakout rule. Many traders use a ribbon purely as a regime filter, taking signals from something else and only in the direction the ribbon is fanned.
Calculation
The arithmetic in words, in the order it happens.
Compute several moving averages of the same source at increasing lengths and plot them together. The averages themselves are ordinary — usually all simple or all exponential — so the arithmetic is just the standard average repeated. What is read is derived: the order of the lines top to bottom, the vertical distance between the fastest and slowest as a measure of trend strength, and the sign of each line’s slope.
Source
An AlgoBeamScript implementation of the formula above, written by us from the arithmetic so the code and the calculation agree line for line.
Runs unchanged on the platform and in the AlgoBeamTS runtime. The language reference is in the documentation.
Inputs
Defaults are the values most charting packages ship with. They are conventions, not optimal settings — the right length depends on your instrument and your holding period.
| Input | Default | What it changes |
|---|---|---|
| Number of averages | 6 | How many lines make up the ribbon. Six to eight is typical: enough to show a fan, few enough to keep the chart readable. More lines make compression easier to spot and everything else harder to see. |
| Length set | 10, 20, 30, 50, 100, 200 | The individual lookbacks. Closely spaced sets such as 20/25/30/35 make an extremely sensitive braid that reacts to small pullbacks; widely spaced sets such as 10/50/200 mix genuinely different horizons and are far more stable. |
| Average type | EMA | Exponential lines fan and compress more readily and are the common choice; simple averages give a slower ribbon that stays aligned through ordinary pullbacks and only unwinds when the trend really breaks. |
| Source | Close | The price used by every line in the group. Keep it identical across lines — mixing sources destroys the ordering, which is the entire point of the display. |
How to read it
What practitioners take from the plot. Read these as descriptions of market state, not as entry signals.
- Fully fanned and rising, fastest on top
- Every horizon is aligned long. The strongest trend state, and the one in which pullback entries have the best context. Also the state most likely to be late.
- Ribbon compressing into a narrow braid
- All horizons have converged on the same price. Trend consensus has evaporated and volatility is usually contracting; expect expansion, but the ribbon does not say in which direction.
- Fast lines rolling over while slow lines still rise
- A pullback inside a larger uptrend, or the first stage of a top. Which one it is depends on whether the fast lines turn back up before reaching the slow ones.
- Lines crossing back and forth in no fixed order
- A directionless market. Trend-following rules should be switched off here regardless of what any single average is doing.
- Ribbon inverting completely, slowest on top
- The trend has changed hands across every horizon. Slow to appear, but a genuine regime statement rather than a single-bar event.
Limitations
Where this indicator misleads. None of these are fixed by a better parameter.
- Every line in the ribbon lags, so the group lags too. Full alignment is confirmation of a trend that is already well established, never an early warning.
- It produces no discrete signal and no level. Ribbons describe a state; turning that state into an entry always requires another rule, and traders who try to trade the ribbon itself end up trading its slowest line.
- In choppy markets the lines tangle and the display becomes actively misleading — a braid can look like a coiling setup for weeks while the market simply goes nowhere.
- The chosen length set determines what you see. Tightly clustered lines will fan on any small move and give a false impression of trend strength.
Educational reference. This page explains how an indicator is built and how it is commonly read. It is not investment advice, not a recommendation and not a signal service. No indicator is profitable on its own — each is a way of describing a market, and any rule built on one has to be tested with realistic costs before it is traded.