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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.