OPEN-SOURCE SCRIPT
MA Confluence Engine [Viprasol]

MA Confluence Engine [Viprasol] — 15-MA Consensus Ribbon
═══════════════════════════════════════════════════════════
ONE CROSSOVER IS AN OPINION. FIFTEEN MAs AGREEING IS A TREND.
═══════════════════════════════════════════════════════════
A single moving-average crossover whipsaws constantly — two lines tangle in chop and
fire signal after signal that goes nowhere. MA Confluence Engine replaces that one
fragile opinion with the agreement of a 15-MA ribbon. It only signals when most of the
ribbon agrees on direction, stands aside when the ribbon squeezes together (a
compressed ribbon IS chop), and on every signal it draws a complete trade plan:
Entry, TP1, TP2, TP3 and Stop Loss.
═══════════════════════════════════════════════════════════
HOW THE CONSENSUS WORKS
═══════════════════════════════════════════════════════════
The engine builds a ribbon of 15 moving averages, spaced from a fast base length
upward (e.g. 10, 18, 26 … 122). Every bar it measures two things across all 15:
• How many is price trading ABOVE?
• How many are SLOPING UP?
These combine into a single CONSENSUS SCORE from 0 to 100:
100% = price above all 15 MAs AND all 15 rising (a fully stacked uptrend)
0% = price below all 15 AND all 15 falling (a fully stacked downtrend)
50% = mixed — the ribbon disagrees
A long signal fires only when consensus rises through your bullish threshold
(default 75%), a short when it falls through the bearish threshold (default 25%).
Half-hearted moves where the ribbon disagrees never trigger.
═══════════════════════════════════════════════════════════
THE TRADE PLAN — DRAWN ON THE LAST SIGNAL
═══════════════════════════════════════════════════════════
The moment a signal fires, the engine projects five levels forward and labels each
with its price:
• ENTRY — at the signal close
• STOP LOSS — your risk distance away (ATR or %); this distance defines 1R
• TP1 / TP2 / TP3 — at your chosen R-multiples of that risk (default 1R / 2R / 3R)
Only the most recent signal's plan is shown, so the chart stays clean. The dashboard
mirrors the exact prices, and every alert carries the full plan (Entry/SL/TP1/TP2/TP3)
so it's ready for journaling or automation.
═══════════════════════════════════════════════════════════
THE RIBBON IS ITS OWN CHOP FILTER
═══════════════════════════════════════════════════════════
When a market chops, moving averages of every length collapse onto each other — the
ribbon goes flat and thin. The engine measures RIBBON WIDTH (the spread of the 15 MAs,
normalized by ATR) and skips signals whenever the ribbon is compressed below your
threshold. A second Kaufman Efficiency-Ratio gate confirms price is actually trending.
Filtered crosses are drawn faintly (✕) and counted, so you SEE what was avoided.
═══════════════════════════════════════════════════════════
21 VERIFIED, LICENSE-CLEAN MOVING AVERAGES
═══════════════════════════════════════════════════════════
Build the ribbon from any one of:
SMA, EMA, WMA, RMA, VWMA, DEMA, TEMA, HMA, ALMA, T3, McGinley, ZLEMA, KAMA, FRAMA,
VIDYA, SuperSmoother, Gaussian, Laguerre, Kalman, LSMA, Median.
Each is implemented from its published formula and credited to its author. Jurik's JMA
is deliberately excluded — it is a proprietary, trademarked product whose every
open-source "version" is an unlicensed reverse-engineering.
═══════════════════════════════════════════════════════════
DASHBOARD
═══════════════════════════════════════════════════════════
• Live consensus score, with price-above and sloping-up counts (x of 15)
• Ribbon width + chop state, trend-regime efficiency reading
• Last signal direction and the full Entry / TP1 / TP2 / TP3 / SL prices
• Whipsaws filtered
═══════════════════════════════════════════════════════════
FEATURES
═══════════════════════════════════════════════════════════
• 15-MA ribbon colored by consensus (red → green) or simple bull/bear, with fill
• Entry/TP1/TP2/TP3/SL level lines + labels on the latest signal
• Choppy-regime background shading + faint markers on filtered crosses
• Direction filter (Both / Longs / Shorts)
• Stop in ATR or %, take-profits as R-multiples
• Alerts for long, short, and chop — signal alerts include the full trade plan
• Full MA sub-parameter control (ALMA, T3, KAMA, Gaussian, Laguerre, Kalman, VIDYA, McGinley)
═══════════════════════════════════════════════════════════
HOW TO USE
═══════════════════════════════════════════════════════════
1. Choose an MA type, base length, and spacing for the ribbon.
2. Wait for a signal — it only fires when the ribbon fans out and aligns (consensus
through your threshold) in a trending regime.
3. Use the drawn Entry / SL / TP1 / TP2 / TP3 as your trade plan; scale out at the TPs.
4. Raise the consensus thresholds and ribbon-width minimum to make signals stricter
(fewer, cleaner) — the whipsaw-filtered count shows the filter working.
═══════════════════════════════════════════════════════════
HONEST LIMITATIONS — PLEASE READ
═══════════════════════════════════════════════════════════
• Signals are evaluated on bar close; act on confirmed bars to avoid intrabar flicker.
• A consensus system enters LATER than a single fast crossover — it trades fewer,
higher-quality moves and will sit out fast reversals. That trade-off is the point.
• The TP/SL levels are a risk framework, not a prediction — markets do not owe you 3R.
• Volume MAs (VWMA) and the regime math need reliable data; some synthetic forex/CFD
feeds are less meaningful.
• This is a decision-support tool, not financial advice. Trade at your own risk.
═══════════════════════════════════════════════════════════
CREDITS & ORIGINALITY
═══════════════════════════════════════════════════════════
MA methods credited to their authors: Wilder (RMA), Mulloy (DEMA/TEMA), Hull (HMA),
Legoux & Kouzis-Loukas (ALMA), Tillson (T3), McGinley, Kaufman (KAMA/Efficiency Ratio),
Ehlers (ZLEMA, SuperSmoother, Gaussian, Laguerre, FRAMA), Chande (VIDYA), Kálmán
(Kalman). All formulas are public-domain / published methods. Every line of Pine — the
MA dispatcher, the 15-MA consensus engine, the ribbon chop filter, the trade-plan
projection, and the visualization — is original Viprasol work written from the
published formulas. No third-party Pine code is reused; no proprietary algorithms included.
═══════════════════════════════════════════════════════════
ONE CROSSOVER IS AN OPINION. FIFTEEN MAs AGREEING IS A TREND.
═══════════════════════════════════════════════════════════
A single moving-average crossover whipsaws constantly — two lines tangle in chop and
fire signal after signal that goes nowhere. MA Confluence Engine replaces that one
fragile opinion with the agreement of a 15-MA ribbon. It only signals when most of the
ribbon agrees on direction, stands aside when the ribbon squeezes together (a
compressed ribbon IS chop), and on every signal it draws a complete trade plan:
Entry, TP1, TP2, TP3 and Stop Loss.
═══════════════════════════════════════════════════════════
HOW THE CONSENSUS WORKS
═══════════════════════════════════════════════════════════
The engine builds a ribbon of 15 moving averages, spaced from a fast base length
upward (e.g. 10, 18, 26 … 122). Every bar it measures two things across all 15:
• How many is price trading ABOVE?
• How many are SLOPING UP?
These combine into a single CONSENSUS SCORE from 0 to 100:
100% = price above all 15 MAs AND all 15 rising (a fully stacked uptrend)
0% = price below all 15 AND all 15 falling (a fully stacked downtrend)
50% = mixed — the ribbon disagrees
A long signal fires only when consensus rises through your bullish threshold
(default 75%), a short when it falls through the bearish threshold (default 25%).
Half-hearted moves where the ribbon disagrees never trigger.
═══════════════════════════════════════════════════════════
THE TRADE PLAN — DRAWN ON THE LAST SIGNAL
═══════════════════════════════════════════════════════════
The moment a signal fires, the engine projects five levels forward and labels each
with its price:
• ENTRY — at the signal close
• STOP LOSS — your risk distance away (ATR or %); this distance defines 1R
• TP1 / TP2 / TP3 — at your chosen R-multiples of that risk (default 1R / 2R / 3R)
Only the most recent signal's plan is shown, so the chart stays clean. The dashboard
mirrors the exact prices, and every alert carries the full plan (Entry/SL/TP1/TP2/TP3)
so it's ready for journaling or automation.
═══════════════════════════════════════════════════════════
THE RIBBON IS ITS OWN CHOP FILTER
═══════════════════════════════════════════════════════════
When a market chops, moving averages of every length collapse onto each other — the
ribbon goes flat and thin. The engine measures RIBBON WIDTH (the spread of the 15 MAs,
normalized by ATR) and skips signals whenever the ribbon is compressed below your
threshold. A second Kaufman Efficiency-Ratio gate confirms price is actually trending.
Filtered crosses are drawn faintly (✕) and counted, so you SEE what was avoided.
═══════════════════════════════════════════════════════════
21 VERIFIED, LICENSE-CLEAN MOVING AVERAGES
═══════════════════════════════════════════════════════════
Build the ribbon from any one of:
SMA, EMA, WMA, RMA, VWMA, DEMA, TEMA, HMA, ALMA, T3, McGinley, ZLEMA, KAMA, FRAMA,
VIDYA, SuperSmoother, Gaussian, Laguerre, Kalman, LSMA, Median.
Each is implemented from its published formula and credited to its author. Jurik's JMA
is deliberately excluded — it is a proprietary, trademarked product whose every
open-source "version" is an unlicensed reverse-engineering.
═══════════════════════════════════════════════════════════
DASHBOARD
═══════════════════════════════════════════════════════════
• Live consensus score, with price-above and sloping-up counts (x of 15)
• Ribbon width + chop state, trend-regime efficiency reading
• Last signal direction and the full Entry / TP1 / TP2 / TP3 / SL prices
• Whipsaws filtered
═══════════════════════════════════════════════════════════
FEATURES
═══════════════════════════════════════════════════════════
• 15-MA ribbon colored by consensus (red → green) or simple bull/bear, with fill
• Entry/TP1/TP2/TP3/SL level lines + labels on the latest signal
• Choppy-regime background shading + faint markers on filtered crosses
• Direction filter (Both / Longs / Shorts)
• Stop in ATR or %, take-profits as R-multiples
• Alerts for long, short, and chop — signal alerts include the full trade plan
• Full MA sub-parameter control (ALMA, T3, KAMA, Gaussian, Laguerre, Kalman, VIDYA, McGinley)
═══════════════════════════════════════════════════════════
HOW TO USE
═══════════════════════════════════════════════════════════
1. Choose an MA type, base length, and spacing for the ribbon.
2. Wait for a signal — it only fires when the ribbon fans out and aligns (consensus
through your threshold) in a trending regime.
3. Use the drawn Entry / SL / TP1 / TP2 / TP3 as your trade plan; scale out at the TPs.
4. Raise the consensus thresholds and ribbon-width minimum to make signals stricter
(fewer, cleaner) — the whipsaw-filtered count shows the filter working.
═══════════════════════════════════════════════════════════
HONEST LIMITATIONS — PLEASE READ
═══════════════════════════════════════════════════════════
• Signals are evaluated on bar close; act on confirmed bars to avoid intrabar flicker.
• A consensus system enters LATER than a single fast crossover — it trades fewer,
higher-quality moves and will sit out fast reversals. That trade-off is the point.
• The TP/SL levels are a risk framework, not a prediction — markets do not owe you 3R.
• Volume MAs (VWMA) and the regime math need reliable data; some synthetic forex/CFD
feeds are less meaningful.
• This is a decision-support tool, not financial advice. Trade at your own risk.
═══════════════════════════════════════════════════════════
CREDITS & ORIGINALITY
═══════════════════════════════════════════════════════════
MA methods credited to their authors: Wilder (RMA), Mulloy (DEMA/TEMA), Hull (HMA),
Legoux & Kouzis-Loukas (ALMA), Tillson (T3), McGinley, Kaufman (KAMA/Efficiency Ratio),
Ehlers (ZLEMA, SuperSmoother, Gaussian, Laguerre, FRAMA), Chande (VIDYA), Kálmán
(Kalman). All formulas are public-domain / published methods. Every line of Pine — the
MA dispatcher, the 15-MA consensus engine, the ribbon chop filter, the trade-plan
projection, and the visualization — is original Viprasol work written from the
published formulas. No third-party Pine code is reused; no proprietary algorithms included.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Viprasol We solve Infinity
Whatsapp +919633652112
Lets do it Together All Automation Solutions Available
Whatsapp +919633652112
Lets do it Together All Automation Solutions Available
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Viprasol We solve Infinity
Whatsapp +919633652112
Lets do it Together All Automation Solutions Available
Whatsapp +919633652112
Lets do it Together All Automation Solutions Available
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.