OPEN-SOURCE SCRIPT
Confluence Conviction Engine [forexobroker]

Confluence Conviction Engine [forexobroker] runs a 4-factor confluence vote across regime, acceleration, signal, and momentum, then turns the net tally into a conviction score from -4 to +4. The unique angle is that a trade only fires when conviction meets a user threshold AND a reclaim-EMA cross prints in the same direction, so weak single-factor agreement is filtered out before any signal.
🔶 ALGORITHM
1. Factor 1 REGIME: +1 if price is above the slow regime EMA, -1 if below.
2. Factor 2 ACCELERATION: compute momentum as the N-bar price rate of change; +1 if its current value rose versus the prior bar, -1 if it fell.
3. Factor 3 SIGNAL: +1 if price is above the fast signal EMA, -1 if below.
4. Factor 4 MOMENTUM: +1 if RSI is above 50, -1 if below.
5. Net vote = sum of the four factor votes (range -4..+4). Conviction = absolute net vote; bias = sign of net vote.
6. With bias set and conviction at or above the minimum, a close crossover (long) or crossunder (short) of the reclaim EMA times the entry. Signals respect a bar cooldown, position-lock, and bar-close confirmation. Non-repainting.
🔶 SIGNAL LOGIC
- Buy: in-session AND bias = +1 AND conviction >= Min Conviction AND close crosses over the reclaim EMA AND position not already long AND cooldown elapsed AND barstate.isconfirmed (then position locks long).
- Sell: in-session AND bias = -1 AND conviction >= Min Conviction AND close crosses under the reclaim EMA AND position not already short AND cooldown elapsed AND barstate.isconfirmed (then position locks short).
- Only fires when net 4-factor conviction reaches the configured threshold.
🔶 INPUTS
- Conviction group: regime trend EMA for Factor 1; default Regime Trend EMA 50.
- Momentum length: ROC lookback whose change forms Factor 2 acceleration; default Momentum Length 12.
- Fast signal EMA: price-vs-EMA test for Factor 3; default Fast Signal EMA 9.
- RSI length: oscillator for the Factor 4 above/below-50 vote; default RSI Length 14.
- Min Conviction: required absolute net vote (1-4) to allow a trade; default Min Conviction 3.
- Volatility reference: ATR length for the dashboard reference; default ATR Length 14.
- Signal Logic group: entry reclaim EMA and cooldown; default Entry Reclaim EMA 9.
- Cooldown: minimum bars between signals; default Cooldown Bars 5.
- Filters group: optional session restriction and session window; default Restrict to Session off.
- Visual group: dashboard, 3-layer glow, reclaim EMA, buy/sell colors, dashboard background.
🔶 ALERTS
CCE Buy, CCE Sell, CCE Any Signal, CCE Full Bull, CCE Full Bear, CCE Edge On, CCE Bias Bull, CCE Bias Bear, CCE EMA Up, CCE EMA Down, CCE Vote Change, CCE RSI Mid, CCE Webhook JSON.
🔶 LIMITATIONS
- The slowest factor (regime EMA) needs its full length to stabilise, so early bars under-report conviction.
- Conviction measures present agreement among four factors; it is a confluence gauge, not a probability or forecast of the next move.
- All four factors are price-derived and can correlate during strong trends, so a full +/-4 vote is not four independent confirmations.
- Default lengths are tuned for liquid instruments; very low timeframes can produce rapid vote flips.
- Entries confirm on bar close, so the reclaim-EMA cross is acknowledged with one-bar lag versus intrabar price.
🔶 ALGORITHM
1. Factor 1 REGIME: +1 if price is above the slow regime EMA, -1 if below.
2. Factor 2 ACCELERATION: compute momentum as the N-bar price rate of change; +1 if its current value rose versus the prior bar, -1 if it fell.
3. Factor 3 SIGNAL: +1 if price is above the fast signal EMA, -1 if below.
4. Factor 4 MOMENTUM: +1 if RSI is above 50, -1 if below.
5. Net vote = sum of the four factor votes (range -4..+4). Conviction = absolute net vote; bias = sign of net vote.
6. With bias set and conviction at or above the minimum, a close crossover (long) or crossunder (short) of the reclaim EMA times the entry. Signals respect a bar cooldown, position-lock, and bar-close confirmation. Non-repainting.
🔶 SIGNAL LOGIC
- Buy: in-session AND bias = +1 AND conviction >= Min Conviction AND close crosses over the reclaim EMA AND position not already long AND cooldown elapsed AND barstate.isconfirmed (then position locks long).
- Sell: in-session AND bias = -1 AND conviction >= Min Conviction AND close crosses under the reclaim EMA AND position not already short AND cooldown elapsed AND barstate.isconfirmed (then position locks short).
- Only fires when net 4-factor conviction reaches the configured threshold.
🔶 INPUTS
- Conviction group: regime trend EMA for Factor 1; default Regime Trend EMA 50.
- Momentum length: ROC lookback whose change forms Factor 2 acceleration; default Momentum Length 12.
- Fast signal EMA: price-vs-EMA test for Factor 3; default Fast Signal EMA 9.
- RSI length: oscillator for the Factor 4 above/below-50 vote; default RSI Length 14.
- Min Conviction: required absolute net vote (1-4) to allow a trade; default Min Conviction 3.
- Volatility reference: ATR length for the dashboard reference; default ATR Length 14.
- Signal Logic group: entry reclaim EMA and cooldown; default Entry Reclaim EMA 9.
- Cooldown: minimum bars between signals; default Cooldown Bars 5.
- Filters group: optional session restriction and session window; default Restrict to Session off.
- Visual group: dashboard, 3-layer glow, reclaim EMA, buy/sell colors, dashboard background.
🔶 ALERTS
CCE Buy, CCE Sell, CCE Any Signal, CCE Full Bull, CCE Full Bear, CCE Edge On, CCE Bias Bull, CCE Bias Bear, CCE EMA Up, CCE EMA Down, CCE Vote Change, CCE RSI Mid, CCE Webhook JSON.
🔶 LIMITATIONS
- The slowest factor (regime EMA) needs its full length to stabilise, so early bars under-report conviction.
- Conviction measures present agreement among four factors; it is a confluence gauge, not a probability or forecast of the next move.
- All four factors are price-derived and can correlate during strong trends, so a full +/-4 vote is not four independent confirmations.
- Default lengths are tuned for liquid instruments; very low timeframes can produce rapid vote flips.
- Entries confirm on bar close, so the reclaim-EMA cross is acknowledged with one-bar lag versus intrabar price.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
🔵Gain access to our powerful tools : kestutisbalciunas.com/tradingview/
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
🔵Gain access to our powerful tools : kestutisbalciunas.com/tradingview/
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
🔵Join our free telegram for updates : t.me/algotradingedge
All scripts & content provided by Forexobroker are for informational & educational purposes only.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。