Skip to content

Correlation

Portfolio Heat in Trading: Total Risk and Correlated Exposure

Portfolio heat in trading is the sum of the planned losses on open positions if every stop is reached, usually expressed in account currency or as a percentage of equity. It measures total open risk under a stated stop convention, not the probability of losing that amount. Correlated positions can concentrate exposure to the same market move even when they use different symbols. Gaps, costs and missing stops can make actual losses exceed the calculated heat.

Illustrative portfolio heat cover showing separate position nodes converging on one shared exposure node.
Several positions can share one market driver.

Portfolio heat connects individual position sizing rules to the account controls in the risk management library. The central question is how much exposure all open positions create together, including positions opened by other strategies.

Portfolio heat at a glance

Scroll horizontally to read every column.

Measure What it answers What it does not answer
Heat in currency Total planned loss at the recorded stops Probability or timing of those stops being reached
Heat as a percentage That total divided by a specified account measure Margin required or maximum possible loss
Return correlation How two return series moved together over a defined window Whether a future shock will preserve the relationship
Shared currency exposure Which currencies the positions buy and sell together The complete set of risks behind each instrument

How do you calculate total open risk?

This page uses an entry-to-current-stop convention. For each open position, calculate the loss from its actual entry to its currently recorded stop, in account currency. Floor that contribution at zero if the stop is beyond entry on the profitable side. Do not subtract one position's planned gain from another's planned loss.

Portfolio heat = sum of the non-negative planned losses at the stops of all open positions

Portfolio heat % = portfolio heat ÷ current account equity × 100

For a position with a loss-side stop: planned loss = lots × stop distance in pips × pip value per 1.00 lot

The last formula rearranges PineConnector's documented loss-based sizing formula.[1] Adding those currency amounts gives the account total. This percentage convention uses current equity, not opening balance, and is undefined if equity is zero. Negative equity does not provide a useful heat percentage.

Some records preserve initial stops instead. That produces initial committed risk, which is useful for comparing original sizing decisions but is not a current-stop exposure measure. Record the convention alongside the number. A position without a usable stop has unmeasured stop-based risk, not a zero contribution.

A zero contribution still leaves floating gains exposed. A stop beyond entry can also produce a different exit result after a gap or execution difference.[1]

Worked example: two forex pairs, one shared currency exposure

Illustrative values, not a recommendation. Assume USD 10,000 equity, no costs, unchanged stops and broker contracts of 100,000 base-currency units per 1.00 lot. Both pairs use a 0.0001 pip, giving USD 10 per pip per lot.

Open position Entry-to-stop distance Planned loss
Long EURUSD, 0.50 lots 20 pips 0.50 × 20 × 10 = USD 100
Long GBPUSD, 0.40 lots 25 pips 0.40 × 25 × 10 = USD 100

Portfolio heat is USD 100 + USD 100 = USD 200. Heat as a percentage of the specified USD 10,000 equity snapshot is 200 ÷ 10,000 × 100 = 2%. Each position contributes 1% of that same equity snapshot.

The long EURUSD position buys EUR against USD; the long GBPUSD position buys GBP against USD. Both therefore carry a short-USD component. A move that strengthens USD against both base currencies is adverse to both positions. Different symbol names have not removed the common exposure.

The example does not claim a current correlation coefficient for EURUSD and GBPUSD. Nor are these positions identical: EUR-specific and GBP-specific moves can affect them differently. Currency direction identifies a shared component; a measured return correlation answers a separate question.

Illustrative portfolio heat diagram linking a USD 100 planned loss on long EURUSD and a USD 100 planned loss on long GBPUSD to a shared short-USD component and USD 200 total heat.
Illustrative positions, not market recommendations or measured correlations. The two USD 100 stop-loss contributions add to USD 200 even though both positions share a currency exposure.

Does correlation change the portfolio heat formula?

Correlation does not change the sum of recorded stop losses. Two USD 100 contributions still total USD 200. Correlation informs how the underlying return series co-move; it does not supply a discount factor for the stop-loss sum.

Positive return correlation can align adverse moves for positions held in the same direction. If one position is short, its directional exposure reverses. A pair-correlation table must therefore be read alongside position direction and size, not just symbol names.

Negative correlation does not make a second position free of risk. Both stops can be reached at different times, stop distances can differ, and the observed relationship can change. Portfolio heat is neither a forecast that all stops will be hit together nor a probability-weighted expected loss.

A useful concentration record groups positions by common exposure, such as short USD, and totals each group's stop-based contributions. A position may belong to several groups. Those overlapping group totals are separate views of the same positions; adding the groups would double-count them.

How do you measure currency-pair correlation?

Compare returns over aligned intervals, rather than two raw price levels. TradingView's official example calculates close-to-close percentage returns for two symbols, requests the second symbol at the chart timeframe, and applies ta.correlation() over a chosen lookback.[2]

Simple return rₜ = (closeₜ − closeₜ₋₁) ÷ closeₜ₋₁

Pearson correlation = Σ[(xₜ − x̄)(yₜ − ȳ)] ÷ √[Σ(xₜ − x̄)² × Σ(yₜ − ȳ)²]

Here x and y are paired return observations; x̄ and ȳ are their means over the same window. The coefficient runs from −1 to +1 and is undefined if either series has zero variation. TradingView's Pine Script v6 reference documents ta.correlation() for rolling correlation.[3]

Illustrative arithmetic only: take three returns in percentage points, x = [−1, 0, 1] and y = [−1, 1, 0]. Both means are zero. The cross-product sum is 1; each squared-deviation sum is 2. Correlation is 1 ÷ √(2 × 2) = 0.5.

Three observations merely make the arithmetic visible. They are not evidence of a stable market relationship. A correlation of 0.5 is not a 50% chance that both positions will lose or that both stops will trigger.

  • Match observations: record the two feeds, timeframe, timestamps and missing-bar treatment. Compare the same intervals.
  • Record the window: a coefficient from intraday returns and one from daily returns describe different samples.
  • Recalculate across windows: a rolling estimate changes as observations enter and leave. An old value is not a permanent property of the pair.
  • Inspect shared shocks: a single linear coefficient does not describe every joint tail event or nonlinear relationship.

The existing forex correlations overview introduces pair relationships. For an actual exposure calculation, record the return window and the position directions explicitly.

How can a rule cap total open risk?

An illustrative entry gate can compare existing heat plus the proposed position's risk with a user-defined cap. No cap or percentage is recommended here.

Permit a candidate only if current heat + reserved pending-entry risk + candidate risk ≤ defined heat cap

Using the worked example, suppose the separately chosen cap is USD 250 and there are no pending entry orders. A candidate with USD 100 planned risk would make heat USD 300. The candidate fails this rule by USD 50 even though its individual size could pass a per-trade rule.

Pending entries are not open positions, so they do not enter the basic open-heat total. They can still create exposure after a new trade is accepted. The entry gate therefore includes a separate reserve for orders that could fill. Label that reserve rather than silently changing what open heat means.

Multiple strategies also need a shared check. If two candidates inspect the same remaining capacity before either updates it, both can pass independently and exceed the combined limit. A proposed implementation needs one authoritative exposure record and reconciliation of requests with unknown outcomes.

For a daily equity-loss limit, use additional loss from current quotes to stops when estimating remaining exposure. Suppose one position originally risked USD 100 and already has a USD 30 floating loss. Its additional loss to the unchanged stop is USD 70. Adding the original USD 100 to the already-counted USD 30 would double-count that floating loss.

What changes when several strategies share an MT5 account?

As of 25 September 2026, MetaTrader 5 documents two position-accounting systems. A netting account holds one common position per symbol; same-direction deals add to it, while opposite-direction deals reduce, close or reverse it. A hedging account can hold several positions on the same symbol, including opposite directions.[4]

On netting accounts, a strategy's intended trade is not necessarily a separate broker position with its own stop. MetaQuotes describes how later orders can replace the common position's SL/TP, subject to the documented inheritance rules. Compute actual heat from the resulting position and stop, not from an assumption that every strategy kept independent protection.

On hedging accounts, sum the actual open tickets. A long and short do not automatically cancel the costs, stop behavior or operational obligations of both positions. The netting versus hedging guide explains the accounting differences.

PineConnector's multi-strategy guide documents matching comments for supported entry, close and cancellation commands.[5] Comments help target supported operations. They do not create separate account equity or remove positions from total account risk.

Where should TradingView and PineConnector exposure checks occur?

A TradingView script can measure correlations from the series it requests.[2] Its simulated positions do not establish the receiving broker's complete exposure. PineConnector's converter explicitly states that it does not resynchronise broker and simulated positions.[6]

A built-in correlation-adjusted portfolio-heat cap is not documented in the cited PineConnector guides; test on demo any separately implemented account-level control. A per-entry vol_dollar= or percentage-risk parameter calculates that entry's volume, not the sum of every open position's stop risk.[1]

Verify the complete sequence: condition true, alert triggered, webhook delivered, PineConnector processing, EA request, broker acceptance, deal and resulting position. Then reconcile volume and accepted stop with the exposure record. A sent close request does not remove a position from heat until the broker outcome is known.

What can portfolio heat miss?

  • Stop execution: a planned stop level is not a fixed realised loss. Costs, fills and gaps can change the result.[1]
  • Protection location: ordinary MT5 SL/TP are held on the broker's server; a stop in strategy logic alone depends on its separate execution path.[7]
  • Unmeasured positions: absent, stale or rejected stops make a numeric total incomplete.
  • Changing denominator: unchanged cash heat becomes a larger percentage when equity falls.
  • Changing relationships: historical return correlation cannot certify future diversification or the probability of a stop-loss cluster.

Frequently asked questions

What is portfolio heat in trading?

Portfolio heat is the sum of planned losses on all open positions if their recorded stops are reached. Divide that total by a named account measure, such as current equity, to express it as a percentage. State whether the calculation uses initial stops or current stops. Heat describes a stop-loss scenario, not its probability or a maximum possible loss.

How do you calculate total open risk?

For each position with a loss-side stop, multiply lots by entry-to-stop distance in pips and pip value per lot in account currency. Add the amounts using the same stop convention. Record positions without usable stops as unmeasured. Pending-entry risk can be reserved separately, because pending orders are not yet open positions.

Why are correlated positions a risk?

Correlated positions can expose several trades to the same adverse move. Long EURUSD and long GBPUSD both have a short-USD component, even though they use different symbols. Position direction and size matter alongside return correlation. Correlation does not alter the sum of planned stop losses or establish the probability that both stops will be reached.

Does negative currency correlation reduce portfolio heat?

Negative return correlation does not reduce a simple sum of stop-based risk. Both positions still have their own stops, and both can lose at different times or when the relationship changes. Any diversification estimate needs a separate model, matching return windows and actual position directions. It should not be silently substituted for total open risk.

Reviewed 25 September 2026. Facts were checked against the linked sources on that date. Nothing in this article was tested on a trading account and no code was compiled.

Related reading

Sources

  1. PineConnector – Syntax: loss-based sizing, pip values and execution limits, accessed 25 September 2026.
  2. TradingView – Other timeframes and data: price-return correlation example, accessed 25 September 2026.
  3. TradingView – Pine Script v6 reference: ta.correlation, accessed 25 September 2026.
  4. MetaQuotes – Basic Principles: netting, hedging and stop inheritance, accessed 25 September 2026.
  5. PineConnector – Keep strategies separate, accessed 25 September 2026.
  6. PineConnector – Pine Script converter: supported behavior, accessed 25 September 2026.
  7. MetaQuotes – Executing Trades: broker-side SL/TP, accessed 25 September 2026.

PineConnector executes the instructions you send it. It does not select trades, manage money, or hold funds. Trading carries risk, and past performance of any strategy does not indicate future results.


Leave a comment

Back To PiCo Blog

Ready when your strategy is

You bring the strategy.We bring the infrastructure.

Connect TradingView to MetaTrader, choose where MT5 runs and put the full PineConnector workflow through its paces from your first month.

Strategy and trading decisions remain yours. The MT5 environment can be ours.

PineConnector Edge

Run the full PineConnector workflow.

$59/mo at launch

Core plan · 1 connection · 1 hosted MT5 environment

Try Core for $7

7 days of Core for $7, then $59/month at the launch price unless you cancel.