OPEN-SOURCE SCRIPT

Master Line Plus. Multi-MA Consensus

485
Master Line Plus — Multi-MA Consensus with Agreement Score

Master Line Plus blends eight different moving-average families into a single consensus trend line, measures how strongly those averages agree, and filters direction with a volatility-aware band. It's a clean, open-source way to read one trend reference — plus a sense of how much conviction is behind it — instead of stacking many moving averages on the chart.

How it works

Every moving-average type reacts to price differently. EMA and WMA weight recent bars heavily and turn quickly; SMA weights all bars equally and turns slowly; RMA (Wilder's) is the smoothest; HMA cuts lag while staying responsive; DEMA and TEMA use multiple EMA passes to reduce lag further; and ALMA applies a Gaussian weighting to balance smoothness and responsiveness. Each one alone is a compromise — fast types whipsaw in chop, slow types lag at turns.

Plus computes all eight over the same length and averages them into one line:

consensus = ( EMA + SMA + WMA + HMA + RMA + DEMA + TEMA + ALMA ) / 8

The purpose of the combination is not to stack indicators, but to average out the bias of each MA type: the lag-reducing members keep the line responsive while the smoother members damp noise, producing a trend estimate steadier than any single fast MA yet more responsive than any single slow one. Using eight diverse families (rather than eight EMAs) is what makes the blend meaningful — they disagree in different conditions, and that disagreement is itself information.

Agreement score. Because the eight averages are diverse, Plus also counts how many of them price is trading above. When most agree (e.g. 8/8) the trend is broad and well-supported; when they split (e.g. 5/8) the move is weaker or transitioning. The dashboard shows this as a percentage aligned with the current trend — a simple conviction gauge a single line can't give.

Direction. Trend is decided with an ATR band rather than a raw cross: it turns bullish only when price closes above the consensus by more than Flip band × ATR, bearish only when it closes the same distance below, and holds the previous trend in between. This deadband suppresses the constant flip-flopping of a plain price/MA cross in sideways markets. Triangles mark the exact flip bar, and the line and optional band are colored by trend.

Signal line & higher-timeframe filter. A signal line (an EMA of the consensus) can be shown for slope/cross context. Optionally, a higher-timeframe consensus must agree before a flip is allowed — so on a 1H chart you can require the daily consensus to also be bullish before a long flip prints.

How to use it

Use the consensus line as your trend reference and bias filter — favor longs while it's teal, shorts while it's red.
Read the Agreement % as conviction: high agreement supports staying with the trend; a falling score warns the move is losing breadth.
Enable higher-timeframe agreement to trade only with the larger trend and cut counter-trend signals.
Widen the Flip band on noisy instruments to reduce false flips; narrow it on clean trends for earlier turns. Increase Length for a slower bias; decrease it for a faster read.
Two built-in alerts fire on bullish and bearish flips.

Settings

Consensus — Source, Length (used by all eight MAs), ALMA offset/sigma.
Trend & signal — Flip band (× ATR) and the signal-line length.
Higher timeframe — require HTF agreement for flips, and the HTF to use.
Display — show/fill band, signal line, flip markers, bar coloring, dashboard.

Notes and limitations

This is a trend-following tool. Like all moving-average methods it lags at turning points and can flip late after sharp reversals; the ATR band trades some timing for fewer false signals.
The higher-timeframe consensus uses request.security with lookahead disabled, so it can update on the still-forming HTF bar until that bar closes. On-chart values are likewise evaluated on the current bar and can update in real time until the bar closes.
It does not predict price and makes no performance claims — use it as one input alongside your own analysis and risk management.

For research and education only. This is not financial advice.

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.