OPEN-SOURCE SCRIPT
Confluence Trend Signals

Confluence Trend Signals
The Confluence Trend Signals indicator is a comprehensive, multi-factor tool designed to identify high-probability trading setups by integrating five separate, proven technical analysis components. It generates clear "High Quality BUY" and "High Quality SELL" signals based on the alignment of these different trend and structure elements.-----Key Confluence Components
The indicator combines the following five components to calculate a final confluence score and trigger signals:
🪸 Coral Trend: Acts as the primary trend filter, using both a "Fast Coral" for entries and a "Slow Coral" for bias confirmation.
📏 Price % of Pivots: Measures price's current position relative to recent swing pivots (highs/lows) and includes an optional Higher Timeframe (HTF) Pivot filter for macro trend alignment.
📈 MACD: Utilizes a custom MACD to confirm directional momentum.
🧱 Smart Money Concepts (SMC) - Order Blocks: Detects both Swing and Internal Order Blocks, and checks if price is within "proximity" (defined by ATR) of a relevant unmitigated block.
📊 VWAP Bias: Filters trades based on price position relative to the Volume Weighted Average Price (VWAP), with a momentum bonus for rising/falling VWAP.
-----High Quality Signal Logic
A signal is generated only when a minimum confluence score is reached and specific gating conditions are met.
High Quality BUY Signal: Requires a Coral Bull Flip, high Pivot % > low Pivot %, MACD bullish alignment, proximity to a bullish Order Block, and price above VWAP (bullish bias).
High Quality SELL Signal: Requires a Coral Bear Flip, high Pivot % < low Pivot %, MACD bearish alignment, proximity to a bearish Order Block, and price below VWAP (bearish bias).
-----Advanced Trade Management
The indicator includes a robust risk management engine with multiple options:
Stop Loss (SL): Calculates a Stop Loss based on ATR (Average True Range) and includes an option for a Structure-Based SL placed beyond the nearest relevant Order Block or swing point.
Take Profits (TPs): Provides up to three Take Profit levels (TP1, TP2, TP3) based on multiples of the initial risk.
Exit Modes: Supports Trailing Stops (trailing to BE, TP1, TP2) or Fixed Exits with options for a single TP target or Partial Exits (scaling out at multiple TPs).
Confluence Decay Exit: A unique feature that closes the trade if the underlying directional confluence score drops below a dynamic or absolute threshold for a specified number of bars, aiming to "let winners run" until the core thesis is invalidated.
The Confluence Trend Signals indicator is a comprehensive, multi-factor tool designed to identify high-probability trading setups by integrating five separate, proven technical analysis components. It generates clear "High Quality BUY" and "High Quality SELL" signals based on the alignment of these different trend and structure elements.-----Key Confluence Components
The indicator combines the following five components to calculate a final confluence score and trigger signals:
🪸 Coral Trend: Acts as the primary trend filter, using both a "Fast Coral" for entries and a "Slow Coral" for bias confirmation.
📏 Price % of Pivots: Measures price's current position relative to recent swing pivots (highs/lows) and includes an optional Higher Timeframe (HTF) Pivot filter for macro trend alignment.
📈 MACD: Utilizes a custom MACD to confirm directional momentum.
🧱 Smart Money Concepts (SMC) - Order Blocks: Detects both Swing and Internal Order Blocks, and checks if price is within "proximity" (defined by ATR) of a relevant unmitigated block.
📊 VWAP Bias: Filters trades based on price position relative to the Volume Weighted Average Price (VWAP), with a momentum bonus for rising/falling VWAP.
-----High Quality Signal Logic
A signal is generated only when a minimum confluence score is reached and specific gating conditions are met.
High Quality BUY Signal: Requires a Coral Bull Flip, high Pivot % > low Pivot %, MACD bullish alignment, proximity to a bullish Order Block, and price above VWAP (bullish bias).
High Quality SELL Signal: Requires a Coral Bear Flip, high Pivot % < low Pivot %, MACD bearish alignment, proximity to a bearish Order Block, and price below VWAP (bearish bias).
-----Advanced Trade Management
The indicator includes a robust risk management engine with multiple options:
Stop Loss (SL): Calculates a Stop Loss based on ATR (Average True Range) and includes an option for a Structure-Based SL placed beyond the nearest relevant Order Block or swing point.
Take Profits (TPs): Provides up to three Take Profit levels (TP1, TP2, TP3) based on multiples of the initial risk.
Exit Modes: Supports Trailing Stops (trailing to BE, TP1, TP2) or Fixed Exits with options for a single TP target or Partial Exits (scaling out at multiple TPs).
Confluence Decay Exit: A unique feature that closes the trade if the underlying directional confluence score drops below a dynamic or absolute threshold for a specified number of bars, aiming to "let winners run" until the core thesis is invalidated.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.