
Creating trading signals that combine multiple technical conditions doesn't have to require custom coding. The Confluence of Alerts indicator for TradingView allows traders to set up complex multi-condition signals through a simple interface, sending automated alerts to TradersPost when all conditions align.
Most TradingView indicators allow you to set a single condition for alerts. You might trigger an alert when RSI crosses above 70, or when price crosses above a moving average, or when volume exceeds a threshold. But what if you want a signal only when RSI crosses 70 AND price is above the 50 EMA AND volume is above average?
Without custom coding, you'd need to create three separate indicators and manually verify that all three conditions are true simultaneously. This approach is time-consuming, error-prone, and doesn't work for automated trading where you need a single alert to trigger your trade.
Confluence in trading refers to the alignment of multiple independent analysis tools to generate stronger signals. When several unrelated indicators all suggest the same trading direction, the probability of a successful trade typically increases compared to relying on any single indicator.
The Confluence of Alerts indicator solves the multi-condition problem by providing a configurable interface where you can set up to four different conditions, specify how they must relate to each other, and generate a single alert only when your confluence requirements are met.
The original Confluence of Alerts indicator served thousands of traders, but user feedback identified several areas for enhancement. Version 2 addresses these requests while upgrading the underlying code to Pine Script version 6.
The original indicator's settings interface packed all controls into a compact space, which sometimes created confusion about which setting affected which condition. Version 2 reorganizes the interface with clear visual separation between each condition's settings.
Each condition now displays in its own distinct section with:
When you add multiple versions of the indicator to a single chart—perhaps one for long entries, another for short entries, and a third for exits—the original version made it difficult to distinguish between them in the alert dropdown menu. All instances showed similar names, leading to confusion about which alert triggered which strategy.
Version 2 allows you to assign custom names to each indicator instance. These names appear in your alert configuration dropdown, making it immediately clear which instance you're setting alerts for. If you label one "Long Entry Confluence" and another "Short Entry Confluence," you'll never confuse them when configuring alerts.
One significant enhancement addresses a common limitation: requiring all conditions to be true at exactly the same bar. In real trading, you often want conditions to have different timing windows.
For example, you might want:
The bar sense feature allows you to specify how many bars back each condition should be checked. Set condition 1 to check the current bar (0), condition 2 to check the last 5 bars, condition 3 to check the current bar, and condition 4 to check the last 3 bars. The indicator signals when all conditions are true within their respective timeframes.
This flexibility dramatically expands the types of strategies you can implement without custom coding.
The original indicator marked conditions on the chart using numbered labels (1, 2, 3, 4) at the bottom of each bar where a condition was true. While functional, this approach became cluttered when multiple conditions triggered frequently.
Version 2 introduces a cleaner visualization system using colored dots in separate rows at the bottom of your chart. Each condition gets its own row with its own color:
This layout makes it easy to scan your chart and see when each condition was true, helping you understand why certain confluence signals fired and others didn't. When debugging your strategy setup, you can quickly see if condition 2 was the limiting factor or if conditions 1 and 3 rarely align.
The original indicator offered alerts for individual conditions and for all conditions being true simultaneously. Version 2 adds an "any condition" alert option, which triggers when at least one of your configured conditions is true.
This feature is useful for:
Let's walk through setting up a simple mean reversion strategy using RSI and moving averages.
Search for "Confluence of Alerts V2" in the TradingView indicators panel and add it to your chart. The indicator won't show any signals initially because no conditions are configured.
Add the RSI indicator to your chart if it isn't already present. In the Confluence of Alerts settings, configure condition 1:
Enable condition 1 using the checkbox
Select "RSI" from the source dropdown
Choose "greater than" for the operator
Enter "30" for the value
This condition triggers when RSI crosses above 30, suggesting the market may be oversold and due for a bounce.
Add an EMA (exponential moving average) indicator to your chart with a 50-period setting. Configure condition 2:
Enable condition 2
Select "Close" for the first source
Choose "greater than" for the operator
Select your "EMA 50" for the second source (the source option)
This condition ensures you're only taking long signals when price remains above the 50 EMA, confirming the longer-term trend is up.
For a mean reversion strategy, you might want some flexibility in timing. Set condition 1's bar sense to 3, allowing RSI to have crossed above 30 within the last 3 bars rather than requiring it to happen on the exact current bar. Leave condition 2's bar sense at 0 to require price to be above the EMA right now.
With conditions configured, you'll see green dots appear below bars where RSI was above 30, and yellow dots where price was above the EMA. Blue signals (the actual trade signals) appear only where both conditions were true within their bar sense windows.
Scan through your chart's history. Do the blue signals appear where you'd want to enter trades? Are there false signals that suggest you need additional conditions? This visual feedback helps you refine your strategy before risking capital.
Click the TradingView alerts button and create a new alert. Select your "Confluence of Alerts V2" indicator from the dropdown, then choose "All Conditions True" for the alert trigger. Configure the alert to fire "Once Per Bar Close" to avoid premature signals on bars that haven't completed.
In the alert message, include the JSON formatted message that TradersPost expects for your entry signal. The indicator documentation includes templates for these messages.
Once you're comfortable with basic setup, several advanced techniques can enhance your strategies.
While the Confluence indicator operates on a single timeframe, you can approximate multiple timeframe analysis by using different lookback periods. For example:
By varying the indicator periods and bar sense windows, you create conditions that respond to different time scales, similar to multiple timeframe analysis.
Many strategies benefit from volume confirmation, ensuring that price moves are supported by trading activity. To add volume confirmation:
Add a volume moving average indicator (20-period simple moving average of volume works well)
Configure a Confluence condition to check if current volume is greater than your volume moving average
Set bar sense to 0-1 to require volume confirmation at entry
This prevents entering trades during low-volume periods where price moves may be less reliable.
Some strategies work better during specific volatility regimes. You can add volatility filters using ATR (Average True Range):
Add an ATR indicator to your chart (14-period is common)
Add a moving average of ATR (20-period SMA)
Create a condition checking if current ATR is greater than (for high volatility strategies) or less than (for low volatility strategies) its moving average
This prevents your strategy from trading during volatility conditions where it historically performs poorly.
For traders interested in understanding or modifying the indicator code, several implementation details are worth noting.
Version 2 uses Pine Script's user-defined types to organize condition settings. Each condition is stored as a structured type containing:
This structure keeps related settings together and makes the code more maintainable as features are added.
The code includes validation to prevent common configuration errors. For example, if you accidentally enable both "value" and "source" checkboxes for the same condition, the indicator automatically disables that condition rather than producing unpredictable results.
This validation prevents alert misconfiguration that could lead to unexpected trades in your automated strategy.
The indicator constructs alert messages that include which specific conditions triggered. This detail helps when reviewing your alerts to understand why a trade was taken. You can see not just that all conditions were true, but specifically which indicators at which values caused the signal.
Version 2 includes Pine logs that record when each condition triggers. These logs appear in TradingView's console and allow you to click directly to the bar where a condition became true. This feature is invaluable for debugging strategy behavior and understanding why signals fire or fail to fire at specific times.
While the published version includes four conditions, the indicator design allows for expansion. The source code includes commented sections showing how to add a fifth, sixth, or additional conditions.
To add additional conditions:
Duplicate the input section for an existing condition
Change all variable names from condition4 to condition5
Duplicate the logic section that evaluates the condition
Add the new condition to the final confluence check that determines if a signal fires
This process is straightforward for anyone comfortable with basic Pine Script editing. The modular structure of the code makes expansion relatively simple.
Future versions may implement a library approach where you import the confluence logic and can add as many conditions as needed without duplicating code. This approach would make it easier to maintain consistent logic across multiple custom indicators.
When trading futures through TradingView and TradersPost, understanding continuous futures contracts is important for your indicators and strategies.
TradingView represents futures with continuous contracts using symbols like ES1! (front month) and ES2! (second month). These artificial instruments stitch together individual contract months to create a seamless price series without gaps when contracts expire.
The platform automatically rolls from one contract month to the next based on volume criteria—when the next contract's volume exceeds the current front month contract's volume, the continuous chart switches to the newer contract.
The Confluence of Alerts indicator works with continuous futures contracts just like any other instrument. However, be aware that:
Rollover periods can create temporary price dislocations that may trigger false signals
Your broker's actual contract rollover timing may differ from TradingView's, potentially causing execution differences
Using second month (2!) contracts can reduce rollover signal frequency if that's a concern
For automated futures trading, monitor your strategy performance around contract expiration dates to verify that rollover periods don't create unexpected behavior.
The real power of the Confluence indicator emerges when connected to TradersPost for automated execution.
When creating your TradingView alert for automation:
Set the alert to trigger "Once Per Bar Close" to avoid false signals on incomplete bars
Use the JSON message format TradersPost expects in your alert message
Include entry quantity, stop loss, and take profit parameters in your message
Test thoroughly in paper trading mode before live execution
The indicator generates reliable signals, but proper alert configuration ensures those signals translate into correct order execution.
One significant advantage of using TradersPost with indicator-based signals is executing across multiple accounts simultaneously. Configure one alert in TradingView, and TradersPost can execute that signal across:
This capability makes the Confluence indicator particularly valuable for traders managing multiple accounts or testing strategies across different brokers.
Before trusting any indicator for live trading, thorough testing is essential.
Use TradingView's bar replay feature to step through historical data bar by bar. Watch when your confluence signals fire. Ask yourself:
Would I have been comfortable taking this trade?
Does the signal appear at a logical entry point?
Are there obvious false signals that suggest additional conditions are needed?
How frequently do signals appear (too many might mean loose conditions, too few might mean overly restrictive conditions)?
This manual review process often reveals insights that automated backtesting misses.
After visual validation, paper trade your confluence strategy for at least 30-50 signals. This provides statistical validation while avoiding the costs of optimization bias. If your strategy doesn't perform acceptably in paper trading with current market data, it's unlikely to succeed in live trading.
When moving to live trading, start with minimal position sizes. Prove the strategy works with real money and real emotions before scaling to your planned position size. This staged approach protects your capital while building confidence in your setup.
Traders use confluence strategies for various approaches, each with different condition configurations.
Trend followers might configure:
This setup ensures you're entering in the direction of the trend, at a reasonable entry point, with confirmation from momentum and volume.
Mean reversion traders might use:
This configuration identifies extreme moves that have exhaustion signals, while avoiding situations where the market is in a genuine structural breakdown.
Breakout traders might configure:
This setup reduces false breakouts by requiring multiple independent confirmations before entering.
Experience with confluence strategies reveals several best practices that improve results.
Begin with two conditions maximum. Verify those two conditions produce reasonable signals before adding complexity. Each additional condition reduces signal frequency, and overly restrictive strategies may not generate enough trades to evaluate properly.
Choose conditions that measure different market characteristics. Using three different moving average crosses as your conditions doesn't provide true confluence—they're all measuring trend with similar logic. Better confluence comes from combining trend (moving averages), momentum (RSI/MACD), volume, and volatility indicators.
Fast indicators like RSI change quickly, so allowing a longer bar sense window (3-5 bars) provides flexibility. Slower indicators like long-period moving averages change gradually, so bar sense of 0-1 is usually sufficient.
Even after deploying a confluence strategy, review signals regularly. Market conditions change, and a confluence combination that worked well in low volatility may produce too many false signals in high volatility. Be prepared to adjust conditions or pause the strategy when markets change character.
The Confluence indicator serves as both a useful tool and an educational example of Pine Script strategy development.
The indicator's source code demonstrates several useful Pine Script techniques:
Studying this code provides a template for building your own custom indicators with similar complexity.
You might customize the indicator for specific use cases:
The modular structure makes these customizations straightforward for anyone with basic Pine Script knowledge.
The Confluence of Alerts V2 indicator provides powerful multi-condition signal generation without requiring custom coding for each strategy variation. By combining multiple independent technical conditions, you create more robust signals that reduce false entries and improve consistency.
Whether you're testing new strategy ideas, managing multiple conditions that would otherwise require custom code, or looking for a cleaner way to generate alerts for TradersPost automation, the Confluence indicator offers a flexible, visual approach to complex strategy development.
Start with simple two-condition strategies to understand how the indicator works, then gradually add complexity as you identify additional filters that improve your results. Use the visual feedback to refine your conditions, paper trade thoroughly before going live, and monitor performance continuously to ensure your confluence logic continues working as market conditions evolve.
The indicator is available in the TradingView public library and continues to evolve based on user feedback. As you develop experience with confluence strategies, you'll discover combinations that work for your trading style, risk tolerance, and market preferences—all without writing a single line of code.