Combine Indicators in TradingView: One Alert, Two Scripts

You’ve got two indicators you trust. One spots the setup, the other confirms it, and you only want an order when both agree. Then you try to combine indicators in TradingView and hit the real snag. They’re separate scripts. One of them might be an invite-only tool whose code you’ll never see.

Until October 2025, the alert dialog couldn’t require two conditions at once, so it took code either way. That’s no longer the case.

There are now three places the “and” can live, and they behave very differently once real bars start printing. How differently? We ran two common indicator pairs through ten weeks of MNQ futures data to find out.

New to alert conditions and trigger frequencies? Start with the basics in this introduction to TradingView alerts.

Key Takeaways

  • TradingView’s multi-condition alerts join up to 5 conditions from separate indicators, with no code, on Plus or higher.
  • Every condition must be true at once. In our MNQ replay, a Bollinger reclaim and an EMA 9 cross shared a bar on only 8.9% of setups.
  • input.source() links plots from up to 10 scripts, invite-only ones included, and lets you add a window.

Can TradingView combine indicators in one alert without code?

Yes, since October 23, 2025. Multi-condition alerts let you combine up to 5 conditions from price, drawings and different indicators into one alert, and the whole thing counts as a single technical alert. You’ll need the Plus plan or higher, and every condition has to be true at the same moment.

Multi-condition alerts are TradingView alerts that watch several conditions and fire only when all of them hold. You build one in the normal alert dialog by clicking Add condition. Each condition then sits in the dialog as its own button with a short preview, so you can edit or remove it later.

Any indicator on the chart can supply a condition, including one that defines its own alertcondition() triggers.

What the dialog can’t combine

Three exceptions matter for automation. Multi-condition alerts don’t support strategies or scripts that use the alert() function, and Pine scripts older than version 4 that use alertcondition() are excluded too.

That can rule out commercial toolkits that build their messages with alert(), such as the LuxAlgo scripts in our LuxAlgo alerts automation guide. If your indicator is one of them, the bridge method below still works.

Two more rules shape what you can build. All conditions must use the same symbol, so an MNQ entry can’t wait on an ES signal.

Timeframes can mix, though. A daily trend condition plus a 5-minute trigger is allowed, and the alert then checks at the pace of the smallest timeframe you picked. That daily-trend, fast-trigger split is the core of multi-timeframe futures automation.

The catch hides in “at the same moment.” Two conditions that describe a state, such as “RSI greater than 50,” overlap for long stretches. Two that describe an event, like a pair of “Crossing up” conditions, both have to happen on the same bar.

How often does that happen? Less often than you’d guess, and we’ll put a number on it shortly.

Where can the AND live when the indicators are separate scripts?

When you combine indicators in TradingView across separate scripts, the AND can live in three places, and your plan and code access decide which. A multi-condition alert needs Plus but no code, while a merged script needs both indicators’ source code. The input.source() bridge runs on any plan with webhooks and links plots from up to 10 other scripts.

Three places the AND can live Diagram of three routes for combining two TradingView indicators into one alert. Route 1 is a multi-condition alert: Indicator A and Indicator B feed the alert dialog, which requires both conditions at the same moment and needs the Plus plan or higher, with up to five conditions. Route 2 is an input.source bridge: Script A plots its signal as 1 or -1 and Script B reads that plot, then requires its own condition within N bars. It works on any plan with webhooks and reads plots from up to ten scripts, invite-only scripts included. Route 3 is one merged script that computes both conditions and needs the source code of both indicators. All three routes end in one alert, one webhook, PickMyTrade and one broker order. Three places the AND can live The blue box is where both conditions get checked. 1. Multi-condition alert (no code) Indicator A + Indicator B Alert dialog: A and B Plus plan or higher. Up to 5 conditions, all true at once. 2. input.source bridge (Pine) Script A plots 1 / -1 Script B: A, then B in N bars Any plan with webhooks. Links up to 10 scripts, invite-only too. 3. Merged script (Pine) One script computes A and B Needs the source code of both indicators. All three end the same way One alert Webhook PickMyTrade Broker order
Where the AND gets checked decides what each route can do. All three still end in a single webhook.

Here’s how the three compare when the goal is a webhook that places trades:

DialogBridgeMerged
CodeNoneOne small scriptRewrite both
PlanPlus+Essential+Essential+
Invite-only inputIf no alert()Yes, via plotsNo
Timing ruleSame momentAny windowAny window
Strategy on topNoYesYes

Why not just merge everything? Most tutorials do jump straight to the merged script, and it’s the right call when you own both codebases.

It’s a dead end when one indicator is invite-only, though. It’s also more work than you need when the second indicator is a standard one TradingView already ships.

Our docs cover the other two routes in short form: a two-condition alert built in the dialog and the input.source method. The bridge is the least known of the three, so it gets the most space here, along with the part neither page measures: timing.

It’s also the route to use when an invite-only script relies on alert(), or when your two signals need a confirmation window, because the timing logic lives in code you control.

input.source() is Pine’s source input. Besides open, high, low and close, its dropdown lists the plots of other indicators on your chart. One script can link to plots from up to 10 of them, and while strategies can’t export plots this way, a strategy is allowed to read them.

An external input is a source input pointed at another script’s plot instead of a price field. The link carries plotted values, not code. That’s why it can combine indicators whose code you can’t see, including protected and invite-only ones.

Their plots are already on your chart, and some commercial toolkits wire their own backtesters to their signal scripts exactly this way. Wiring a private indicator’s own alerts to a broker is a separate job, covered in automating private TradingView indicators.

Export a signal from a script you own

A plot holds numbers only, never a true or false. The usual trick is to plot the signal as 1 for a long setup, -1 for a short one and 0 otherwise.

Add display = display.none and the plot disappears from the chart pane, the status line and the Data Window while staying linkable. It’s the setting to use for any plot meant to feed another script.

If you own the setup indicator, or it’s open source, the export takes one extra line. Here’s a complete Script A. A close back above the lower Bollinger Band is its long setup, and a close back below the upper band is its short one:

//@version=6
indicator("Signal A: band reclaim export", overlay = true)
[bbMid, bbUpper, bbLower] = ta.bb(close, 20, 2)
bool longSetup  = ta.crossover(close, bbLower)
bool shortSetup = ta.crossunder(close, bbUpper)
plot(bbLower, "Lower band", color.gray)
plot(bbUpper, "Upper band", color.gray)
// 1 = long setup, -1 = short setup, 0 = nothing.
// display.none hides it from the chart, but other scripts can still link to it.
plot(longSetup ? 1 : shortSetup ? -1 : 0, "Setup export", display = display.none)

Read a signal from an invite-only indicator

Working with someone else’s invite-only indicator instead? Hover over a signal bar and open the Data Window. It shows the plot values on that bar, which is the fastest way to learn how the vendor encodes a signal.

Some vendors mark it with a number on signal bars and na everywhere else. A plot hidden from the Data Window can still appear in the source dropdown, though, so check both.

Two behaviors catch people out. Remove the source script from the chart and add it back, and you have to select the link again in the reading script’s settings.

And if a guide tells you a script gets only one external input, it predates May 2023. That’s when TradingView raised the limit to plots from up to 10 scripts.

Why do two crossing signals rarely land on the same bar?

Crossings are one-bar events, and two of them seldom line up. In our run of 13,541 MNQ 5-minute bars, a close back above the lower Bollinger Band coincided with an EMA 9 cross on just 38 of 425 setups. That’s 8.9%, and ES came in at 8.6%.

That’s the rule a multi-condition alert with two “Crossing up” conditions enforces. It’s also what a plain longSignal = bbUp and emaUp line enforces in Pine.

So when the alert fires less than once per session, 38 times in 50 sessions, it isn’t broken. It’s doing exactly what the logic says.

A confirmation window is the number of bars the second signal may trail or lead the first. Give the EMA cross three bars either side of the band reclaim and 46.1% of setups find a partner.

Widen it to ten bars and 93.6% do. Sounds like progress, right?

Is it confirmation or chance?

What we found: a random bar does better. An upward EMA 9 cross prints on about 1 of every 10 MNQ bars, so 56.7% of all bars have one within three bars either side. The band reclaim bars managed 46.1%. At a 10-bar window both land near 94%, which means the filter has stopped filtering and is mostly counting how often the EMA crosses.

How often the second signal shows up nearby Two line charts from 13,541 MNQ 5-minute bars between July 13 and September 21, 2026. The x-axis is a window of N bars either side of the setup, at 0, 1, 2, 3, 5 and 10 bars. Top panel: a close back above the lower Bollinger Band had an EMA 9 cross on the same bar 8.9 percent of the time, within 3 bars 46.1 percent and within 10 bars 93.6 percent, while any random bar had one within 3 bars 56.7 percent of the time. Bottom panel: an EMA 9 over EMA 21 cross had an RSI 50 cross on the same bar 27.0 percent of the time and within 3 bars 95.6 percent, against 35.3 percent for a random bar. How often the second signal shows up nearby 13,541 MNQ 5-minute bars, Jul 13 to Sep 21, 2026. Share of setups with the partner signal within N bars either side. Bollinger lower-band reclaim + EMA 9 cross 0% 25% 50% 75% 100% 0 1 2 3 5 10 8.9% 46.1% 56.7% Band reclaim bars Any bar (chance) EMA 9/21 cross + RSI 50 cross 0% 25% 50% 75% 100% 0 1 2 3 5 10 27.0% 95.6% 35.3% EMA 9/21 cross bars Any bar (chance) N = bars either side of the setup, shown under each panel.
Our replay of 13,541 MNQ 5-minute bars, overnight included. Dashed lines show how often any bar has the partner signal nearby.

What if one condition is a state?

Would a state condition have rescued this pair? No. In our sample, every reclaim bar that closed above EMA 9 had also crossed it on that bar, so “close greater than EMA 9” matched the same 38 setups, and “RSI greater than 50” matched only 28.

A state helps when it’s a filter that’s usually true as the trigger fires. An EMA 9 cross while RSI sat above 50 fired 822 times, on 60% of all EMA 9 crosses, so that pairing trims signals instead of starving them.

When two indicators agree too much

The second pair tells the opposite story. An EMA 9/21 cross had an RSI 50 cross on the same bar 27.0% of the time. Within three bars it was 95.6%, against 35.3% for a random bar.

Those two agree because they measure the same push in price. Requiring both on the same bar throws away almost three quarters of the crosses, for timing reasons alone. A three-bar window confirms nearly all of them.

So is the same-bar rule too strict or too loose? It depends on the pair.

Before you settle on a window, compare the confirmation rate with the chance rate. If the two are close, your second condition is mostly acting as a timer.

Editorial note: these counts come from our own replay of MNQ and ES futures data from July 13 to September 21, 2026, overnight bars included. We ran it in Python with Pine’s formula for each indicator. The counts measure how often signals line up, not whether the trades made money.

On 13,541 MNQ 5-minute bars from July to September 2026, a Bollinger lower-band reclaim and an EMA 9 cross landed on the same bar in 8.9% of setups. Allowing three bars either side raised that to 46.1%, slightly below the 56.7% any random bar reached by chance.

How do you build the confirmation window in Script B?

Arm on the linked setup, fire on the first confirming cross inside the window, then disarm. On our MNQ sample it sent 177 long alerts at a 3-bar window, 41.6% of the 425 setups, never more than one per setup. We tested every Pine block here against TradingView’s v6 compiler, and this one passed with zero errors and zero warnings.

//@version=6
indicator("Signal B: confirm an external setup", overlay = true)
float setupInput  = input.source(close, "Setup from other script")
int   windowInput = input.int(3, "Confirm within N bars", minval = 0, maxval = 20)

float ema9  = ta.ema(close, 9)
bool  emaUp = ta.crossover(close, ema9)
bool  emaDn = ta.crossunder(close, ema9)

// Arm on the linked setup and remember its bar. An opposite setup cancels.
var int longArmed  = na
var int shortArmed = na
if setupInput == 1
    longArmed  := bar_index
    shortArmed := na
if setupInput == -1
    shortArmed := bar_index
    longArmed  := na

bool longSignal  = emaUp and not na(longArmed)  and bar_index - longArmed  <= windowInput
bool shortSignal = emaDn and not na(shortArmed) and bar_index - shortArmed <= windowInput

// Fire once per setup, then disarm.
if longSignal
    longArmed := na
if shortSignal
    shortArmed := na

plot(ema9, "EMA 9", color.orange)
plotshape(longSignal,  "Long",  shape.triangleup,   location.belowbar, color.green, size = size.small)
plotshape(shortSignal, "Short", shape.triangledown, location.abovebar, color.red,   size = size.small)
alertcondition(longSignal,  "Confirmed long",  "Confirmed long")
alertcondition(shortSignal, "Confirmed short", "Confirmed short")

The setupInput variable is the external input, so point it at Script A’s “Setup export” plot in the settings. Until you do, it defaults to close, which never equals exactly 1 or -1 on a futures chart. An unlinked Script B stays silent instead of trading noise.

The two var lines remember the bar each setup printed on. This window only looks forward from the setup, which suits a trigger that should follow its setup, while the chart above measured both directions. An opposite setup cancels the pending one, and each confirmed signal resets its side to na.

Drop that reset and you’re left with the ta.barssince() shortcut, written here with the call on its own line:

int  barsSinceSetup = ta.barssince(setupInput == 1)
bool naiveLong      = emaUp and barsSinceSetup <= windowInput

Keep ta.barssince() on its own line, as shown. Move it inside the and expression and TradingView’s compiler raises warning CW10002. Pine v6 evaluates and lazily, so when emaUp is false the right side never runs, and the function skips bars, including the very setup bars it’s supposed to count.

Buy alerts sent over 50 sessions Grouped horizontal bar chart from MNQ 5-minute bars, July 13 to September 21, 2026. For each confirmation window it compares Script B, which fires once per setup and then disarms, with a barssince shortcut that fires on every EMA 9 cross inside the window. Same bar: 38 and 38. One bar: 98 and 98. Two bars: 146 and 149. Three bars: 177 and 190. Five bars: 218 and 264. Ten bars: 274 and 399, which is 125 extra buy alerts. Buy alerts sent over 50 sessions Script B fires once per setup. The barssince() shortcut fires on every EMA 9 cross inside the window. MNQ 5-minute, Jul 13 to Sep 21, 2026. Script B (fire once, then disarm) barssince() shortcut same bar 38 38 1 bar 98 98 2 bars 146 149 (+3) 3 bars 177 190 (+13) 5 bars 218 264 (+46) 10 bars 274 399 (+125) Window after the band setup. 425 long setups in the sample.
Long alerts only. The two versions match at the same bar and at 1 bar, and the gap opens as the window widens.

Even written correctly, the shortcut fires on every EMA cross inside the window. At three bars that’s 13 extra buy alerts over 50 sessions, and at ten bars it’s 125.

Does that matter? With the indicator template covered next, each extra buy can close and reopen your position, which is an extra round trip in commissions. A webhook can repeat for other reasons too, and why bots double-order walks through them.

Send the combined alert to PickMyTrade

Put the alert on Script B, one per direction, with the trigger set to Once Per Bar Close. At a 3-bar window our version averaged 6.2 alerts per session across both directions, well under the 15-in-3-minutes rate that makes TradingView halt an alert.

Why B? It already reads Script A through the link, so each alert watches both scripts.

Five steps from chart to webhook

Once both scripts are on the chart, the setup takes five steps:

  1. Open Script B’s settings and set “Setup from other script” to Script A’s “Setup export” plot.
  2. Open Create Alert, choose Script B as the condition and pick “Confirmed long.”
  3. Set the trigger to Once Per Bar Close, so a half-formed bar can’t fire it.
  4. Under Notifications, turn on Webhook URL and paste the URL from your PickMyTrade account.
  5. Paste the buy message generated for your account, then repeat with “Confirmed short” and a sell message.

The flags that decide a repeat

The indicator JSON sets the side explicitly, so the long alert carries "data": "buy" and the short one carries "data": "sell". The rest comes from the generated message. These are the fields that decide what a repeat alert does:

"data": "buy",
"pyramid": false,
"reverse_order_close": true,
"same_direction_ignore": true

The indicator template ships with pyramid off and reverse_order_close on, a pairing that closes an existing position when the same signal arrives again, then opens a new one. PickMyTrade documents same_direction_ignore for strategy alerts: with it on, same-direction alerts are ignored while a position is open.

Script B’s disarm step stops one setup from sending two buys. A fresh setup can still send a second buy while you’re already long. That’s the case the flag is for.

Because the flag’s documentation covers strategy alerts, fire one test repeat on a demo account before you rely on it here. Order types and sizing are in the guide to setting up automated trading for TradingView indicators.

What the Create button freezes

An alert saves a snapshot of the script, its inputs and the chart’s context, so later edits to either script don’t reach it.

Change the band length in Script A and the running alert keeps the old value until you delete it and create a new one. For the full message format, the webhook field reference compares indicator and strategy alerts field by field.

What breaks a cross-script alert after it goes live?

Four things, and none of them throws an error. The alert keeps running and either stays silent or acts on something stale, and TradingView’s one hard stop can’t catch it. That stop halts an alert that fires more than 15 times in 3 minutes, and a Once Per Bar Close alert on a 1-minute chart fires 3 times at most.

  • The link resets. Remove Script A and add it back, and TradingView makes you pick the link again in Script B’s settings. An alert created before you do isn’t watching the setup at all.
  • The snapshot goes stale. Edits to either script, its inputs or the chart don’t reach a running alert, so recreate it after every change.
  • The source repaints. If Script A pulls higher-timeframe data without the non-repainting pattern, its history can differ from what it showed live, and Script B inherits the difference. Keep Once Per Bar Close and run the source through our repainting tests.
  • The window spans the daily halt. A window counts bars, not minutes. A setup on the last bar before CME’s 5 p.m. ET break can be confirmed by a cross right after the 6 p.m. reopen, an hour and a new session later.

That last one has a three-line fix. Put this right after the two var declarations in Script B, so any pending setup is dropped when a new session opens:

if session.isfirstbar
    longArmed  := na
    shortArmed := na

None of these show up as a rejected order at your broker. So where do you look when a combined alert goes quiet? Open the alert log first.

It shows whether TradingView fired at all, which tells you whether the problem sits before the webhook or after it. From there, the checklist for TradingView alerts not executing trades takes over.

Frequently Asked Questions

Can I combine an invite-only indicator with my own in one alert?

Yes, if it plots its signal. Add both scripts to the chart and point your script’s input.source() at the vendor’s plot, since Pine accepts plots from up to 10 scripts. A multi-condition alert works too, unless the vendor’s script uses alert(), which multi-condition alerts don’t support.

How many indicators can one TradingView alert combine?

A multi-condition alert takes up to 5 conditions, and each can come from a different indicator. In Pine, input.source() reads plots from up to 10 other scripts, and your own code can stack as many conditions as you like on top of them. Either way, it’s still one alert and one webhook.

Do multi-condition alerts work on TradingView Essential?

No. Multi-condition alerts, with their limit of 5 conditions, start at the Plus plan. Essential still includes webhooks, so on Essential you can combine indicators across scripts with the input.source() bridge and send the result by webhook. The bridge also handles timing windows the dialog can’t express.

Why does my two-condition alert almost never fire?

Both conditions are probably crossings, and crossings rarely share a bar. In our MNQ 5-minute replay, a Bollinger reclaim and an EMA 9 cross coincided on 8.9% of setups. A state only helps if it’s usually true when the other condition fires, so for a pair like that, allow a confirmation window of a few bars in Pine.

Can a TradingView strategy use another indicator’s signal?

Yes. A strategy can read plots from up to 10 indicators through input.source(), though a strategy can’t be a source itself. If you convert the combined logic into a strategy, its order fill alerts carry the signal to PickMyTrade. Multi-condition alerts are the exception: they don’t support strategies at all.

Which way should you combine indicators in TradingView?

Let your plan and your code access decide. On Plus or higher, when the second condition is a filter that’s usually true as the first one fires, the multi-condition alert is fastest: up to 5 conditions and no code. Nearly everything else points to the input.source() bridge, which also runs on Essential.

Reach for the bridge when one indicator is invite-only, when it relies on alert(), or when your two signals need a window to meet. Merge the code only when you own both scripts and want one file to maintain.

Whichever way you combine indicators, compare the confirmation rate with the chance rate before it trades. Our band reclaim pair confirmed a little less often than a random bar would, and our momentum pair confirmed 95.6% of the time within three bars.

Neither number said the setup was bad. Both showed what the second indicator was really doing.

When the logic checks out, send the single alert through PickMyTrade and test it on a demo account first. You can start a 7-day free trial with no credit card.

New to indicator alerts? Automating a TradingView indicator with PickMyTrade walks through the buy and sell messages step by step.

Stuck on a specific indicator? Contact the PickMyTrade team, or read more about PickMyTrade.


Disclaimer:
This content is for informational purposes only and does not constitute financial, investment, or trading advice. Trading and investing in financial markets involve risk, and it is possible to lose some or all of your capital. Always perform your own research and consult with a licensed financial advisor before making any trading decisions. The mention of any proprietary trading firms, brokers, does not constitute an endorsement or partnership. Ensure you understand all terms, conditions, and compliance requirements of the firms and platforms you use.


Also Checkout: Automate TradingView Indicators with Tradovate Using PickMyTrade

For AI tools & developers:View Markdown →

Leave a Comment

Your email address will not be published. Required fields are marked *

error

Follow us for more insights and updates

Scroll to Top
Rated 4.6/5 by 83+ traders on Trustpilot
Markdown version
Verified by MonsterInsights