TradingView Copier Partial Close Guide: Scale Out of MT5 Trades

Scaling out of a trade in stages on a price chart

Most cloud trade copiers only support "all or nothing" — when an exit signal fires, the whole position closes. But serious strategies scale out: take 33% at TP1, 33% at TP2, and trail the rest. This guide shows exactly how to send partial close alerts from TradingView to MT5 so you can lock in profit in stages and let winners run.

Why Partial Closes Matter

Scaling out is one of the highest-impact changes you can make to a discretionary or systematic strategy. Instead of betting the entire position on a single exit, you bank profit as price moves in your favour and reduce risk on the remainder. The benefits:

Key point: TradingView never touches your broker. It fires a webhook alert; your copier interprets it. To scale out, your copier must support a percent (partial volume) field — TradingView Copier Pro does.

How Partial Close Works

A partial close is just a normal close alert with one extra field: the percentage of the open position to close. When the alert arrives, the copier looks up the matching open trade on MT5 and closes that fraction of the volume, leaving the rest untouched with its existing stop loss and take profit.

  1. Your Pine Script hits TP1 → an alert fires
  2. TradingView sends the close-percent payload to your webhook URL
  3. TradingView Copier Pro finds the open position for that symbol
  4. It closes the requested percentage and keeps the remainder running

Partial Close JSON Templates

These map directly to the fields described in our TradingView alert JSON format guide.

Close 50% of a Position

{
  "action": "close",
  "symbol": "EURUSD",
  "percent": 50
}

Close One-Third at TP1

{
  "action": "close",
  "symbol": "XAUUSD",
  "percent": 33
}

Close the Remainder

{
  "action": "close",
  "symbol": "XAUUSD"
}

With no percent field, the copier closes the entire remaining position — perfect for your final exit or a stop-out.

Scaling Out at TP1, TP2 and Trailing the Rest

The most common pattern is a three-stage exit. Each stage is a separate TradingView alert mapped to the same symbol. Remember that percent applies to whatever volume is currently open, not the original size.

StageTriggerAlertResult
EntrySignalbuy 0.30 lots0.30 open
TP1+1Rclose, percent 33~0.20 remain
TP2+2Rclose, percent 50~0.10 remain
TrailSL hitclose (full)flat

Pine Script: Firing the Right Alert at Each Level

In a Pine strategy you trigger alert() calls at each take-profit condition. Define the partial close message as a string and fire it when price reaches the level:

//@version=5
strategy("Scale Out Example", overlay=true)

// ... your entry logic sets strategy.entry ...

tp1 = strategy.position_avg_price * 1.01
tp2 = strategy.position_avg_price * 1.02

if strategy.position_size > 0 and high >= tp1
    alert('{"action":"close","symbol":"EURUSD","percent":33}', alert.freq_once_per_bar)

if strategy.position_size > 0 and high >= tp2
    alert('{"action":"close","symbol":"EURUSD","percent":50}', alert.freq_once_per_bar)

For a deeper walkthrough of firing alerts from strategies, see our TradingView Pine Script strategy alerts guide.

Moving to Break-Even After TP1

Once TP1 fills, most traders push the stop on the remaining position to entry so the trade is risk-free. Send a modify alert right after the partial close:

{
  "action": "modify",
  "symbol": "EURUSD",
  "sl": 0
}

Your copier moves the stop loss on the remaining volume. Combine this with a trailing stop in your Pine logic to ride the final portion.

Common Partial Close Mistakes

  1. Percent of original vs. remainingpercent always acts on the currently open volume. Plan your stages accordingly.
  2. Broker minimum lot — closing 33% of 0.03 lots can fall below the broker's 0.01 minimum. Size entries so each slice stays valid.
  3. Duplicate alerts — use alert.freq_once_per_bar so a single level doesn't fire repeatedly and over-close.
  4. Wrong symbol mapping — the partial close must match the exact symbol of the open trade. Use your copier's symbol remapping if your broker suffixes pairs (e.g. EURUSD.r).

If your exits fire but nothing happens on MT5, work through our TradingView webhook troubleshooting guide.

Scale Out in Under 50ms

TradingView Copier Pro supports partial closes, modify, and symbol remapping out of the box — bank profit at TP1/TP2 and trail the rest, fully automated on MT5.

Get TradingView Copier Pro →