Trade Multiple Currency Pairs With One Strategy
Learn how to run one forex strategy across several currency pairs: one TradingView alert per chart, pair limits, per-pair sizing, and correlation risk.
Marketing
Bottom Line
- Use one shared rule set, but create a separate chart and alert for every pair.
- Reuse one JSON template with
{{ticker}}and restrict the accepted pair list. - Track and size every pair independently in account-currency terms.
- Cap combined exposure when pairs share correlated currency risk.
- Progress from test signals to manually approving initial live signals.
To trade multiple currency pairs with one strategy, apply the same Pine Script rules to a separate TradingView chart for each pair, then create one alert per chart. Each alert can reuse the same JSON template and webhook URL while the {{ticker}} placeholder identifies the chart’s currency pair.
The execution logic may be shared, but position sizing, ticker validation, open positions, and correlation risk still need pair-level controls. Roll it out in stages: test signals, then manual approval of live trades before full automation.
Why Trade Multiple Currency Pairs
One Strategy, Many Pairs
One strategy across many pairs means applying a single entry and exit rule set identically to several currency pairs. You maintain one Pine Script strategy or indicator instead of writing a custom script for every market.
The shared logic does not eliminate the need for separate alerts. Each pair runs on its own chart and sends its own signal. The Pine code supplies consistent conditions, while the chart supplies the symbol, timeframe, and market data used for each calculation.
This structure makes maintenance easier. If you change an entry filter or stop rule, you update the common script, apply the revised version to each chart, and recreate the affected alerts. TradingView saves a mirror image of the script, its inputs, the chart symbol, and the timeframe when an alert is created, so later chart changes do not update an existing alert.1
Diversification Versus Concentration
Adding pairs does not automatically diversify a strategy. The Correlation Coefficient measures how closely two instruments move together on a scale from -1 to 1. A value near 1 indicates positive correlation, a value near -1 indicates movement in opposite directions, and 0 indicates no correlation.2
Low correlation can reduce duplicated portfolio risk. High correlation can cause several positions to respond to the same currency move at once. A strategy trading several pairs may therefore create a concentrated exposure even though every chart has a different symbol.
Forex And Plan Limits
Forex counts as one of the asset classes your plan allows, whether the strategy trades one pair or several. That is a plan limit, not a risk limit: the account can still hold several positions with overlapping currency exposure.
One Alert Per Chart
Why Every Pair Needs One
A TradingView alert uses the chart’s main symbol and timeframe when it is created. It then runs on TradingView’s servers without requiring the trader to remain logged in.1 Changing the symbol displayed in your browser does not change the running alert.
Strategy alerts work the same way. TradingView creates a server-side copy of the chart strategy, and changes to the strategy or its settings do not affect that copy. You must delete and recreate the alert when its context changes.3
A five-pair deployment therefore needs five configured charts and five alerts. The alerts can point to the same TradersPost strategy webhook, but each remains an independent signal source.
Map Symbols With Ticker
The {{ticker}} placeholder inserts the chart symbol into the alert message. On a EURUSD chart, it resolves to EURUSD automatically. That lets one JSON template work across every pair without manually changing the ticker value in each alert box.
On a Pine Script strategy, one message can carry the chart ticker, the order direction, the price, and the signal time:
{
"ticker": "{{ticker}}",
"action": "{{strategy.order.action}}",
"price": "{{close}}",
"time": "{{timenow}}"
}
TradingView sends a webhook as an HTTP POST request to the configured URL, with an application/json content type when the message is valid JSON, and it warns against putting login credentials or passwords in the message.4
Pine Alert Logic
Pine Script’s alert() function supports dynamic messages built at runtime and works in indicators and strategies. Calls trigger only when the script’s conditions and frequency settings permit them, and alerts operate on realtime bars.1
Place each alert() call inside the condition that should produce the signal. An unconditional call in global scope can execute on every bar, which is rarely appropriate for order routing.
Inputs can gate selective calls for long entries, short entries, or exits. This gives one script distinct alert behavior without duplicating its full logic. It does not replace the chart-per-pair requirement. Every chart still needs its own running alert because each alert is bound to one symbol and timeframe.
Limit The Accepted Pairs
List Allowed Pairs
A forex strategy can be limited to a defined list of pairs written in the EUR/USD format. This creates a validation boundary between the incoming TradingView signal and the connected account.
An allowlist helps prevent a mistyped ticker or an unrelated alert from becoming a trade. Keep the list aligned with the charts you intend to run, then update it deliberately when adding or removing a pair.
- List each permitted pair in EUR/USD format.
- Confirm that every chart uses the intended market symbol.
- Send a test signal after changing the allowlist.
- Remove inactive alerts when removing a pair.
Use Accepted Symbol Formats
The accepted forex shapes are EUR/USD, TradingView’s EURUSD form, and OANDA’s EUR_USD form. A ticker sent in another shape is rejected with an invalid-forex-ticker-format error.
Choose one format for routine alert generation and use it consistently. For TradingView alerts, {{ticker}} is usually the simplest option because the chart supplies the symbol. The allowlist can remain in EUR/USD format even when the incoming alert sends EURUSD.
One Position Per Pair
Pair-Level Position Tracking
TradersPost keeps one position per pair. A long EUR/USD position and a short GBP/USD position are tracked separately, so each pair the strategy trades holds its own long or short rather than one blended forex position.
Hedging sub-accounts cannot be enabled for an OANDA connection, and US OANDA accounts are netting-only. Within the one-position-per-pair model, additional orders for the same pair affect that pair’s existing position state rather than creating a second independent long or short position.
Opposing Signals Stay Separate
A buy signal for one pair and a sell signal for another are two unrelated trades. They do not offset each other merely because one is long and the other is short.
The webhook action value, including buy, sell, exit, or add, is evaluated against the signal’s ticker and that pair’s current position. Review logs by pair when diagnosing unexpected entries, additions, or exits.
Size Pairs In Account Currency
Why Unit Counts Differ
OANDA position sizing is sent in whole units of the pair’s base currency. Fractional quantities are unavailable through this connection, so decimal results round down.
Amount per position, Risk per position, and Percent of equity use the currency in which the account is held. Because each base currency has a different exchange rate against the account currency, the same account-currency amount produces different unit counts across pairs.
This is why copying one fixed unit quantity across every chart is not equivalent to applying one consistent account-currency allocation. Review forex position sizing and risk per trade before selecting the sizing method.
Read The Position Example
Suppose Amount per position is 1000 on a USD account and EUR/USD is 1.0800. The resulting order is 925 units after conversion and rounding down.
Risk per position needs a stop loss, because the quantity comes from the distance between entry and stop. Using one sizing method for every pair keeps the instruction consistent, but the resulting units still differ from pair to pair.
Convert Lots Into Units
Standard, mini, and micro lots are industry vocabulary for 100,000, 10,000, and 1,000 base-currency units. An OANDA connection sends and tracks whole units, not lots.
If a trading plan is written in lots, convert each lot amount to units before setting a fixed quantity. Alternatively, use Amount per position or Risk per position so units are calculated from an amount in your account currency.
Watch Combined Currency Exposure
Correlated Pairs Become One Bet
Several pairs sharing a currency can respond to the same underlying move. Separate chart symbols do not make those exposures independent. Correlation near 1 indicates that two instruments tend to move together, while correlation near -1 indicates that they tend to move in opposite directions.2
Check both the direction and magnitude of each currency exposure. For example, buying EUR/USD and selling USD/CAD are opposite actions, but both are short the US dollar.
Forex trading on margin is high risk and not suitable for everyone, because leverage magnifies losses as well as gains and you can lose money quickly.
Cap Basket-Level Risk
Treat correlated positions as a shared risk basket rather than assigning each pair a full independent risk allowance. This is a sizing and exposure decision, not a recommendation about which pairs or allocations to use.
A practical review can include:
- Total risk if every active stop is reached.
- Net exposure to each shared currency.
- Correlation over a relevant lookback period.
- Maximum simultaneous positions in one risk group.
Correlation changes over time, so a historical relationship should not be treated as permanent.2 Recheck it as part of regular strategy maintenance. See the detailed guide to currency correlation in forex for a broader workflow.
Test Each Pair First
Dry Run Every Webhook
Add "test": true to a webhook payload to process the signal without sending an order to the broker. Send a test for every pair so each ticker, quantity and action is checked and logged on its own.
Do not assume that one successful test proves all alerts are correct. Each chart has its own symbol, inputs, message, and running alert instance. Test each one after creating it and repeat the test after changing its ticker format or payload.
Approve Initial Live Signals
Turn off Auto Submit on the subscription when moving beyond test signals. With Manual Submit active, each trade waits for approval or rejection before it is sent to the connected broker.
Review the first signal from every pair. Confirm the ticker, direction, unit quantity, order type, stop loss, and take profit before approval. This catches pair-specific configuration errors before the full basket runs unattended.
For the single-pair version of this workflow, see the TradingView to OANDA automation guide.
Frequently Asked Questions
Can One Strategy Trade Several Pairs?
Yes. Add the strategy or indicator to a separate chart for each pair and create an alert on every chart. The {{ticker}} placeholder fills in the chart’s symbol automatically, while the alerts run independently on TradingView’s servers.
Do More Pairs Use More Allowance?
No. Forex counts as one asset class regardless of how many individual pairs the strategy accepts or trades. The allowance applies to the asset category rather than each pair.
Why Is My Ticker Rejected?
A forex strategy accepts EUR/USD, EURUSD, or EUR_USD. Another symbol shape triggers the invalid-forex-ticker-format rejection. Check the resolved ticker in the alert log and keep the payload consistent.
Why Do Pair Sizes Differ?
Account-currency sizing is converted into each pair’s base-currency units. Different exchange rates therefore produce different quantities from the same dollar amount or risk setting. OANDA quantities are rounded down to whole units through this connection.
Are Correlated Pairs Riskier?
They can create more concentrated exposure because several positions may respond to the same currency move. Use the Correlation Coefficient, shared-currency exposure, and total stop risk to decide how much aggregate risk the basket can carry.
References
1 Pine Script User Manual: Alerts
2 TradingView Help: Correlation Coefficient (CC)
3 TradingView Help: Strategy Alerts
4 TradingView Help: How to Configure Webhook Alerts