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.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
🔵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.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
🔵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.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.