Multiple take profit levels automation looks like a settings problem. You pick three targets, split the contracts, paste one JSON into TradingView and you’re done. Then your strategy’s own exit fires on a Tuesday afternoon, and the account that should be flat is short five contracts.
Table of Contents
- Where can multiple take-profit levels live?
- What does one alert with three exit legs actually send?
- The sizing rules the generator enforces
- What the numbers in dollar_tp mean
- What happens when your strategy’s own exit fires?
- A Pine pattern that sends close on exits
- What about indicator alerts on Tradovate?
- How to automate Pine Script partial exits instead
- What you give up
- Which brokers support multiple take profit levels automation?
- Does splitting the exit improve your results?
- Why split at all
- A warning for backtests
- Why the PickMyTrade docs seem to disagree
- What should you test before going live?
- Frequently Asked Questions
- Which setup should you pick?
Nothing malfunctioned: the alert did exactly what its flags told it to. The trouble is that “one alert, three targets” only describes the entry. Every later fill sends its own message, and the setup that works for one kind of strategy quietly breaks another.
This guide follows each of those messages. It picks up where our earlier overview of multiple take-profit levels from one TradingView alert stopped. That post covers the JSON walkthrough, so here we look at what happens after the entry fills.
Key Takeaways
- PickMyTrade’s multi-leg JSON splits one entry into exit legs with their own contracts, target and stop, but only on Tradovate and only with a fixed contract count.
- PickMyTrade’s own flag table says that under the workaround’s flags (pyramid off, reverse on), a flat strategy’s exit re-opens a position the other way.
- In a fair market, a 2/2/1 split at +10/+15/+20 points has the same expected value as one target. It changes the mix of trades, not the edge.
Where can multiple take-profit levels live?
There are 3 places your take-profit levels can sit: at the broker as resting orders, inside your Pine Script strategy, or in separate alerts you build yourself. Each one changes who holds the stop, how many webhooks fire per trade, and whether the contract count can follow your strategy’s sizing.
Most confusion starts because people mix two of them. The table below is our map.
| Broker legs | Pine exits | Close alerts | |
|---|---|---|---|
| Targets rest | At the broker | In Pine | In the indicator |
| Stop rests | At the broker | In Pine | Wherever you put it |
| Webhooks per trade | 1 | 1 per fill | 1 per alert |
| Quantity source | Fixed in the JSON | Your strategy | Fixed per alert |
| Brokers | Tradovate only | All | All, with limits |
Broker legs (advance_tp_sl) means the entry order carries several exit groups, each with its own contracts, target and stop. Pine exits means your strategy calls strategy.exit() several times, and each fill fires its own webhook. Close alerts, the third route, mostly exist for indicators on brokers that can’t hold several brackets.
Where the stop sits matters most. A stop resting at the broker still works through a TradingView outage, while one that lives in Pine Script exists only as long as the alert pipeline does. What happens to yours if an alert never arrives?
What does one alert with three exit legs actually send?
One webhook carries the whole plan: a quantity of 5 plus an advance_tp_sl array of 3 blocks sized 2, 2 and 1. That’s the example in PickMyTrade’s multiple TP/SL strategy workaround, last updated September 3, 2026. Each block closes its own contracts at its own target.
advance_tp_sl is the JSON array that holds those exit groups. Every block carries its own quantity, take profit, stop loss, breakeven and trailing fields, so leg 3 can trail while leg 1 just sits on a fixed target. The advanced trading features page walks through a 7-contract version split 4 and 3.
Here’s the shape of the documented example, trimmed to the fields that matter:
{
"symbol": "MNQ1!",
"data": "{{strategy.order.action}}",
"quantity": 5,
"pyramid": false,
"same_direction_ignore": false,
"reverse_order_close": true,
"order_type": "MKT",
"advance_tp_sl": [
{ "quantity": 2, "dollar_tp": 10, "dollar_sl": 10, "breakeven": 0, "trail": 0 },
{ "quantity": 2, "dollar_tp": 15, "dollar_sl": 10, "breakeven": 0, "trail": 0 },
{ "quantity": 1, "dollar_tp": 20, "dollar_sl": 10, "breakeven": 0, "trail": 0 }
]
}The real template has more zeroed fields per block. Don’t hand-edit the array. The docs say to leave advance_tp_sl and multiple_accounts as generated and change only the data line.
The sizing rules the generator enforces
We analyzed the alert generator’s code to see what it will and won’t let through. Three rules came out of it, and none of them is spelled out on the docs page.
- The “Add multiple tp/sl” button only appears when the alert sizes by quantity and has stop loss and take profit switched on. In risk-percentage mode it isn’t offered at all.
- The legs must add up to the total. If they don’t, it refuses with: “Please make sure your total quantity matches the combined quantity set in the advanced TP/SL allocations before generating the alert.”
- The “Add TP/SL” button disappears once the legs cover the full quantity, so you can’t add an empty fourth leg.
That fixed total is the price of the feature. The workaround page says it plainly: PickMyTrade uses the quantity in the alert JSON and ignores your strategy’s quantity. A strategy that sizes by volatility or account equity will keep sending 5, whatever it calculated.
It also sets a floor. You need at least as many contracts as legs, because futures trade in whole contracts. A single MNQ can’t be split; two gives you 1 and 1; three is the smallest size that fits three targets.
What the numbers in dollar_tp mean
Despite the name, dollar_tp: 10 in the documented example means 10 points of price, not 10 dollars, which is $20 per contract on MNQ. Type ticks into the generator and its code multiplies them by the tick size. The result lands in those same fields, so the JSON always carries a price distance.
So the 2/2/1 plan risks 10 points on 5 contracts: $100 on MNQ and $1,000 on NQ. Check the dollar risk the generator displays before you copy anything. Is it the number you had in mind?
The same unit rule applies to each leg’s breakeven, which our breakeven offset tick math covers in detail. Trailing legs follow the step model in our auto trail stop math.
What happens when your strategy’s own exit fires?
Under the workaround’s flags, every buy or sell closes the open position, then opens a fresh 5-contract trade in its direction. The JSON configuration reference states this in its pyramid table: with reverse on and pyramid off, “A new trade opens if not a close signal.”
Now remember what a strategy alert is. Order fill alerts are the messages TradingView sends every time the strategy’s simulated broker fills an order, and they fire immediately. The alert box holds one message, so every fill sends the same JSON: entries, exits, stops, the lot.
And that JSON says "data": "{{strategy.order.action}}" with "quantity": 5 and three legs. An exit from a long is a sell, which is the same thing the next short entry sends. PickMyTrade can’t tell the two apart, and the table above says what it does with a sell.
Here’s what that flag table implies for four strategy shapes:
| Your strategy | What the exit fill sends | What happens |
|---|---|---|
| Stop-and-reverse, always in | sell, 5, three legs | Leftovers close, a new short opens with its legs |
| Flat between trades, own exit | sell, 5, three legs | Leftovers close, then an unwanted short opens |
| Pine partial exits (sell 2, 2, 1) | sell, 5, three legs | All 5 close at market, a 5-lot short opens |
| Entries only, no exits | Nothing | TradingView still thinks you’re long |
The first row is the case the documented example quietly assumes. A stop-and-reverse strategy only ever sends the next entry, so “close and reverse” is exactly right. The other three rows need a different setup.
The last row fails more quietly: broker legs can close the whole position while TradingView’s copy of the strategy stays long. With the default pyramiding of 1, TradingView then ignores the next long signal, since it thinks you’re already in. You miss the trade and get no error message.
These rows follow from the documented flags, not from a live run of each one, so test the row that matches your strategy on a demo account before you rely on it.
A Pine pattern that sends close on exits
For a strategy that goes flat between trades, give each order its own message. Pine’s alert_message argument lets an entry send the multi-leg JSON while the exit sends a plain close. In PickMyTrade, a close alert closes all open positions and cancels open orders without opening anything new.
//@version=6
strategy("Multi-TP entry, close on exit", overlay = true)
buyJson = input.text_area("", "PickMyTrade BUY alert JSON")
sellJson = input.text_area("", "PickMyTrade SELL alert JSON")
closeJson = input.text_area("", "PickMyTrade CLOSE alert JSON")
// alert_message text skips TradingView's placeholders, so fill the two the JSON uses
fill(string json) =>
stamp = str.format_time(timenow, "yyyy-MM-dd'T'HH:mm:ss'Z'", "UTC")
str.replace_all(str.replace_all(json, "{{close}}", str.tostring(close)), "{{timenow}}", stamp)
fast = ta.ema(close, 9)
slow = ta.ema(close, 21)
goLong = ta.crossover(fast, slow)
goShort = ta.crossunder(fast, slow)
exitL = ta.crossunder(close, slow)
exitS = ta.crossover(close, slow)
if strategy.position_size == 0 and goLong
strategy.entry("L", strategy.long, alert_message = fill(buyJson))
if strategy.position_size == 0 and goShort
strategy.entry("S", strategy.short, alert_message = fill(sellJson))
if strategy.position_size > 0 and exitL
strategy.close("L", alert_message = fill(closeJson))
if strategy.position_size < 0 and exitS
strategy.close("S", alert_message = fill(closeJson))Generate three alerts in PickMyTrade (buy with your legs, sell with your legs, and close) and paste each JSON into its input box, unedited. Then set the TradingView alert message to {{strategy.order.alert_message}} and nothing else. We compiled this script against TradingView’s Pine v6 compiler with zero errors and zero warnings.
The small fill() function exists because TradingView swaps placeholders in the alert box, but never inside alert_message text. The generated JSON carries {{close}} and {{timenow}}, so the script writes those two values in itself.
It’s also why buy and sell get separate JSONs.
Keep in mind that the inputs hold your PickMyTrade token, so never publish the script with them filled in.
This pattern has two limits. If the broker legs close everything first, TradingView still shows the position open, and the position_size == 0 check blocks new entries until the Pine exit fires. The backtest won’t show the legs either, because TradingView only simulates the orders written in the script.
{{strategy.market_position}} is the documented alternative that needs less work: it sends long, short or flat instead of buy or sell. The docs describe flat as “close position or no action”, though, so test which one your account gets before you trust it.
Our market_position vs market_position_size breakdown covers its size partner.
What about indicator alerts on Tradovate?
Indicator alerts are the simplest case, because no strategy exit can misfire. The FAQ says Tradovate supports multi-level TP and SL for indicators via “Multiple TP/SL (Advanced)”, with nothing to swap afterward.
The trap is a repeat signal: the indicator guide says a buy alert “Cancels any open positions and open orders” before it opens a new buy. So a second buy flattens your working legs and starts over. Set same_direction_ignore to true, and PickMyTrade ignores new alerts in the direction you already hold.
How to automate Pine Script partial exits instead
If your targets are already coded in Pine, keep them there. A strategy that exits 2, 2 and 1 contracts sends 3 separate sells, and PickMyTrade places each one as it arrives. The workaround page itself points here for strategies with built-in multiple TP/SL.
Multiple Exits mode is the PickMyTrade setting for this case, labeled “Multiple Exits (TP1, TP2…)” in the alert generator. Its own description reads: “My strategy sends a separate exit (opposite) signal for each Take Profit level.” It attaches no stop or target to the entry.
On the Pine side, several strategy.exit() calls can share one entry, and each reserves its qty from the open position. All of them sit in one reduce-type OCA group, so a fill on one leg shrinks the others instead of overselling. We compiled this version cleanly on Pine v6:
//@version=6
strategy("3-target scale-out", overlay = true)
fast = ta.ema(close, 9)
slow = ta.ema(close, 21)
goLong = ta.crossover(fast, slow)
if goLong and strategy.position_size == 0
strategy.entry("L", strategy.long, qty = 5)
if strategy.position_size > 0
e = strategy.position_avg_price
strategy.exit("TP1", "L", qty = 2, limit = e + 10, stop = e - 10)
strategy.exit("TP2", "L", qty = 2, limit = e + 15, stop = e - 10)
strategy.exit("TP3", "L", qty = 1, limit = e + 20, stop = e - 10)Call order matters. The first strategy.exit() reserves its contracts first, so a later call can only exit what’s left. Use qty rather than qty_percent when the split has to come out in whole contracts, and read the List of Trades to confirm the sizes you expected.
Pair it with the default strategy alert: {{strategy.order.action}} for direction and {{strategy.order.contracts}} for size, the strategy JSON shown in the configuration reference. The strategy automation guide covers the Multiple Exits choice itself. Then a TP1 fill sends sell 2, and the long drops from 5 to 3.
What you give up
This route costs you two things, and both come from where the orders live:
- The stop lives in TradingView. Nothing rests at the broker. If an alert fails to deliver, the position has no protection until you step in.
- Targets arrive as market orders. TradingView fills its limit on the chart, then the webhook sends a market exit, so a fast move can cost you a tick or two versus a resting limit.
Also watch the stop-out: each leg carries its own stop, so a hit can come through as up to three sells on the same bar. Keep same_direction_ignore off for these alerts, and make sure nothing between TradingView and the broker filters repeats. Our duplicate webhook guide covers where those filters hide.
Which brokers support multiple take profit levels automation?

Broker-side legs from a single alert work on 1 PickMyTrade connection: Tradovate. Every other broker gets multiple take profit levels automation through Pine partial exits, or through separate alerts. We analyzed the alert generator of the app that serves Rithmic, ProjectX, Interactive Brokers and the rest, and advance_tp_sl doesn’t appear anywhere in its code.
| Broker | Legs from one alert | Pine partial exits |
|---|---|---|
| Tradovate | Yes | Yes |
| Rithmic | No | Yes |
| ProjectX / TopstepX | No, one TP and one SL per symbol | Yes |
| TradeLocker | Not yet | Yes |
| Interactive Brokers | Varies by routing and account | Yes |
The ProjectX line comes from PickMyTrade’s own FAQ. It’s also why stacked brackets on TopstepX can leave orders behind, which our look at TopstepX OCO brackets digs into.
Tradovate itself has one more boundary: the manual Trade Copier doesn’t copy multi-target orders. Place Target #1 and Target #2 by hand, and linked accounts get only a single take profit and stop. Automated alerts to several accounts are a different path.
What about indicators on a broker without legs? The FAQ suggests a separate close alert per target, fired from the indicator as price reaches each level.
Be careful there: a plain close alert flattens the whole position. Closing part of it takes comment-tagged entries, and that targeted partial close works for indicator alerts only.
Does splitting the exit improve your results?
In a fair market it doesn’t. A 5-contract MNQ trade split 2/2/1 at +10, +15 and +20 points, with a 10-point stop, has an expected gross result of exactly $0, the same as one target at +15. What the split changes is how often you win, how much, and how far results swing from trade to trade.
We ran the closed-form math for a fair random walk, where price is as likely to tick up as down, and checked every plan with 40,000 simulated trades. The simulations landed within a third of a point of zero every time. Here’s the mix each plan produces:
The middle row holds the surprise: the first target fills on half of all trades, yet only 40% of trades finish green. One in five TP1 fills still ends red, because 2 contracts bank 10 points while 3 contracts give back 10 points at the stop. That’s a $20 loss on a trade where a target filled.
Add breakeven on legs 2 and 3 once TP1 fills, and green trades rise to 50%. Nothing is free, though: runs to the last target drop from 33.3% of trades to 25%. The spread of results also narrows, from $122 per trade with one target to $105 with the split plus breakeven.
Why split at all
For most futures traders, the shape of the results matters more than the average. Prop firm consistency rules cap how much of your profit one day can hold, and daily loss limits punish long losing streaks. A narrower spread helps with both, which our guides to the prop firm consistency rule and daily loss limits a bot respects explain.
Commissions don’t change either. Tradovate charges per contract, so 5 contracts cost the same whether they leave in one order or three. On MNQ that’s $9.50 a round turn at the Free plan’s all-in rate of $0.95 per side.
A warning for backtests
In our July to September 2026 sample, the median regular-hours 5-minute MNQ bar spanned about 31 points. That’s about as wide as the whole 30-point range from the stop to TP3, so all three legs can trigger inside a single bar. The backtest then has to guess the order, so don’t trust a bar-level test of a plan this tight.
Why the PickMyTrade docs seem to disagree
You’ll find pages that seem to contradict the workaround, and it helps to know which one wins. The FAQ answer on multiple take-profit levels, dated November 7, 2025, says “Tradovate does not support multiple TP levels from a single TradingView strategy alert.” The workaround page was published a month later, on December 9, 2025, and updated on September 3, 2026.
The newer page and the app itself are the current state. The older FAQ line described how things stood before the workaround existed. Three more details trip people up:
- The strategies guide lists the partial exit strategy with TP/SL “Currently Unsupported”. That means PickMyTrade won’t attach broker targets to a strategy that already sends its own exits, which is the Multiple Exits rule again.
- The workaround says to pick Indicator as the alert type, even though the JSON goes into a strategy alert. You build an indicator-style JSON with fixed legs, then swap the
dataline so the strategy supplies direction. - The FAQ’s example splits a 2-contract entry into 1, half and half. Futures can’t trade half a contract, so read it as 2, 1 and 1 on a 4-contract entry.
A fourth one is worth knowing too. The FAQ says reverse_order_close “should be used only with indicator-based alerts”, while the workaround ships it as true inside a strategy alert. Both hold once you see the workaround JSON as an indicator JSON running on a strategy’s signals.
What should you test before going live?
Run at least 3 complete trade cycles on a Tradovate demo before any live contract sees the alert. Make one reach every target, stop one out before TP1, and let your strategy exit the third mid-trade. For the account side, see testing a strategy on Tradovate demo.
- Match your strategy to one row of the four-shape table, and pick the setup that row calls for.
- Check that the legs add up to the total.
- Hold at least one contract per leg, since futures don’t trade in fractions.
- Compare the dollar risk the generator shows with your own math: points × point value × contracts.
- After each cycle, put the broker’s position next to the strategy’s position in TradingView. They should agree.
- Look for working orders left behind after any close, and cancel strays before the next signal.
If the broker and TradingView ever disagree after an exit, stop there and fix the setup. Every later signal inherits that mismatch. Why stack new trades on a position you can’t explain?
Frequently Asked Questions
Yes, on Tradovate: PickMyTrade’s advance_tp_sl array lets one alert open a position with separate exit legs, such as 2, 2 and 1 contracts at +10, +15 and +20 points. Each leg carries its own target, stop, breakeven and trail. On other brokers, code the partial exits in Pine and send one alert per fill.
At least 3, because each leg needs a whole contract and futures can’t be split. One MNQ contract can’t scale out at all. The generator also requires the legs to add up exactly to the total, so a 5-contract alert split 2/2/1 passes, while 2/2/2 on 5 contracts is refused.
Yes, but only through Pine partial exits, not broker legs from one alert. The multi-broker generator has no advance_tp_sl option, and ProjectX and TopstepX allow 1 take profit and 1 stop per symbol. Code each target with strategy.exit(), then choose Multiple Exits mode when you generate the alert.
PickMyTrade’s flag table says that with pyramid off and reverse on, every sell closes the open position and then opens a new short. A flat strategy’s exit sends sell with the full 5-contract quantity and three legs. Send a close alert on exits instead, using alert_message, or use {{strategy.market_position}} after testing it on demo.
No: the workaround hardcodes every quantity, and PickMyTrade ignores the size your Pine strategy calculates. Sizing by equity or volatility never reaches the broker. Regenerate the alert whenever your size changes, or move the targets into Pine so {{strategy.order.contracts}} carries the real size of each fill.
Which setup should you pick?
Match the setup to how your alert exits, because 4 exit styles need 4 different alert setups. That one choice decides whether multiple take profit levels automation behaves or quietly flips your position:
- Stop-and-reverse on Tradovate: use the workaround JSON as documented. It’s the case it was built for.
- Flat strategy on Tradovate: keep the legs, and send a close on exits with the
alert_messagepattern above. - Targets already in Pine, any broker: use Multiple Exits mode and the default strategy JSON.
- Indicator alerts on Tradovate: use Multiple TP/SL with
same_direction_ignoreon.
Whichever you choose, prove it on demo first, then check the broker’s position against TradingView after every exit. Start with the 7-day free trial with no credit card via the Tradovate automation page.
You can read more about the PickMyTrade team, or contact us if your exits behave differently from what’s described here.
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: Connect Tradovate with Trading view using PickMyTrade
