OPEN-SOURCE SCRIPT
Confluence Trend Matrix [NQ Labs]

Confluence Trend Matrix [NQ Labs]
- The Confluence Trend Matrix combines four independent trend signals into a single confluence score, ranging from -4 (full bearish agreement) to +4 (full bullish agreement). Instead of relying on one indicator in isolation, it measures how many independent factors currently agree on trend direction — the idea being that alignment across multiple methods is more informative than any single signal alone.
The four factors:
- Each factor scores +1 (bullish), -1 (bearish), or 0 (neutral):
- EMA Structure — Evaluates price position relative to a fast and slow EMA. Scores bullish only when price is above the fast EMA and the fast EMA is above the slow EMA (clean uptrend structure), and mirrors for downtrends. Mixed conditions score neutral.
- SuperTrend — Uses the SuperTrend direction (ATR-based) as a trend-following component. Bullish when SuperTrend is below price, bearish when above.
- ADX-Gated Direction — Takes directional bias from DI+/DI-, but only counts it when ADX is above a strength threshold. In weak, directionless conditions this factor stays neutral, which helps filter out chop.
- Higher-Timeframe Trend — Compares the higher-timeframe close against a higher-timeframe EMA, using confirmed HTF bars to avoid repainting. This anchors the lower-timeframe read to the broader trend.
How it's displayed:
- Confluence Band — An ATR envelope around price that colors according to the aggregate score. The band grows more opaque as agreement strengthens toward ±4, giving an at-a-glance read of trend conviction. Band width is adjustable via the ATR multiplier.
- Dashboard Table — A compact panel breaking down each of the four factors individually, plus the net score, an overall strength label, and net bias. This shows not just what the score is, but which specific factors are driving it.
- Background Tint — A subtle highlight when confluence reaches maximum agreement (±4).
Alerts:
- Confluence flip (crossing between bullish and bearish territory)
- Maximum confluence reached (+4 or -4)
Settings:
- All factor parameters are adjustable — EMA lengths, SuperTrend factor and ATR period, ADX length and threshold, higher timeframe, and HTF EMA length — so the tool can be tuned to different markets and timeframes. Visual options include band width, transparency, table position, and colors.
Notes:
- This indicator is a trend-analysis and confluence-visualization tool. It does not generate buy or sell recommendations and makes no claim about future performance. It is intended as one input within a broader analysis process, not as a standalone system. As with any indicator, results vary across markets, timeframes, and conditions — test thoroughly before relying on it.
Open-source and free to use.
Feedback and suggestions are welcome.
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.
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.
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.