Upgrading Confluence of Alerts Indicator

Fact checked by
Mike Christensen, CFOA
November 5, 2025
Learn how to combine multiple technical conditions into powerful trading signals with the upgraded Confluence of Alerts indicator.

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.

The Challenge of Multiple Conditions

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.

The Confluence Solution

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.

Version 2 Improvements

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.

Cleaner Interface Design

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:

  • Condition number clearly labeled
  • All settings for that condition grouped together
  • Visual spacing that makes scanning settings easier
  • Checkbox controls that make enabling/disabling conditions more intuitive

Improved Alert Naming

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.

Bar Sense Feature

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:

  • Price to be above the 200 EMA (checked on the current bar)
  • RSI to have crossed above 30 within the last 5 bars
  • Volume to be above average (checked on the current bar)
  • A custom indicator signal to have triggered within the last 3 bars

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.

Enhanced Visualization

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:

  • Condition 1: Green dots in the first row
  • Condition 2: Yellow dots in the second row
  • Condition 3: Orange dots in the third row
  • Condition 4: Red dots in the fourth row

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.

Additional Alert Options

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:

  • Monitoring multiple different setups from a single indicator
  • Creating watchlist alerts that notify you when any of several interesting conditions occur
  • Testing different conditions to see which ones trigger most frequently

Setting Up Your First Confluence Strategy

Let's walk through setting up a simple mean reversion strategy using RSI and moving averages.

Step One: Add the Indicator

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.

Step Two: Configure Condition 1 - RSI Oversold

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.

Step Three: Configure Condition 2 - Price Above Moving Average

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.

Step Four: Set Bar Sense Windows

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.

Step Five: Review Visual Feedback

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.

Step Six: Create the Alert

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.

Advanced Configuration Techniques

Once you're comfortable with basic setup, several advanced techniques can enhance your strategies.

Combining Different Timeframes

While the Confluence indicator operates on a single timeframe, you can approximate multiple timeframe analysis by using different lookback periods. For example:

  • Condition 1: RSI(14) on current timeframe using bar sense of 0
  • Condition 2: RSI(70) with bar sense of 5 (approximates a higher timeframe trend)
  • Condition 3: Price relationships using bar sense 0
  • Condition 4: Volume confirmation using bar sense 1-2

By varying the indicator periods and bar sense windows, you create conditions that respond to different time scales, similar to multiple timeframe analysis.

Volume Confirmation

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.

Volatility Filters

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.

Pine Script Implementation Details

For traders interested in understanding or modifying the indicator code, several implementation details are worth noting.

User Defined Types

Version 2 uses Pine Script's user-defined types to organize condition settings. Each condition is stored as a structured type containing:

  • Whether the condition is enabled
  • Which indicator or value to compare
  • The comparison operator (greater than, less than, crosses above, etc.)
  • The comparison target (value or another indicator)
  • The bar sense lookback window
  • Whether to only check on bar close

This structure keeps related settings together and makes the code more maintainable as features are added.

Input Validation

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.

Alert Message Construction

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.

Pine Logs Integration

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.

Expanding Beyond Four Conditions

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.

Adding More 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.

Library Version Concept

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.

Continuous Futures Compatibility

When trading futures through TradingView and TradersPost, understanding continuous futures contracts is important for your indicators and strategies.

How Continuous Futures Work

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.

Indicator Considerations

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.

Integrating with TradersPost

The real power of the Confluence indicator emerges when connected to TradersPost for automated execution.

Alert Configuration for Automation

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.

Multiple Account 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:

  • Multiple broker accounts
  • Different prop firm accounts
  • Various position sizes based on account equity
  • Mix of live and paper trading accounts for testing

This capability makes the Confluence indicator particularly valuable for traders managing multiple accounts or testing strategies across different brokers.

Testing and Validation

Before trusting any indicator for live trading, thorough testing is essential.

Visual Backtesting

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.

Paper Trading Validation

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.

Gradual Live Implementation

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.

Common Use Cases

Traders use confluence strategies for various approaches, each with different condition configurations.

Trend Following with Confirmation

Trend followers might configure:

  • Condition 1: Price above long-term moving average (trend filter)
  • Condition 2: Price pullback to short-term moving average (entry timing)
  • Condition 3: Momentum indicator confirming trend direction
  • Condition 4: Volume confirmation

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 with Filters

Mean reversion traders might use:

  • Condition 1: Price deviation from mean exceeds threshold (opportunity identification)
  • Condition 2: Momentum indicator showing exhaustion (reversal signal)
  • Condition 3: Price remains within longer-term range (avoid catching falling knives)
  • Condition 4: Volume climax suggesting capitulation

This configuration identifies extreme moves that have exhaustion signals, while avoiding situations where the market is in a genuine structural breakdown.

Breakout with Validation

Breakout traders might configure:

  • Condition 1: Price breaks above resistance or below support
  • Condition 2: Volume exceeds average (confirms breakout legitimacy)
  • Condition 3: Momentum indicator confirms direction
  • Condition 4: Volatility expansion indicates genuine move

This setup reduces false breakouts by requiring multiple independent confirmations before entering.

Best Practices

Experience with confluence strategies reveals several best practices that improve results.

Start Simple

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.

Use Independent Indicators

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.

Match Bar Sense to Indicator Speed

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.

Review Signals Regularly

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.

Customization and Development

The Confluence indicator serves as both a useful tool and an educational example of Pine Script strategy development.

Learning from the Code

The indicator's source code demonstrates several useful Pine Script techniques:

  • Organizing complex strategies with user-defined types
  • Input validation to prevent configuration errors
  • Dynamic alert message generation
  • Visual display of multiple data series
  • Pine logs for debugging

Studying this code provides a template for building your own custom indicators with similar complexity.

Building Custom Versions

You might customize the indicator for specific use cases:

  • Create a version specific to forex trading with pip-based thresholds
  • Build a crypto version with additional conditions for funding rates or exchange-specific data
  • Develop a multi-timeframe version that checks conditions on different timeframes
  • Create specialized versions for specific market conditions (high volatility, low volatility, trending, ranging)

The modular structure makes these customizations straightforward for anyone with basic Pine Script knowledge.

Moving Forward

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.

Ready to automate your trading? Try a free 7-day account:
Try it for free ->