Attach a stop and target to a new entry
If the alert opens a new futures trade, put the entry, stop loss and take profit in the same TradingView message. If the position is already open, skip to the existing-position examples. In each example, replace My_API_Key with the label of your saved futures connection.
BTCUSDT on My_API_Key
market long 0.01 sl off 2% tp off 5%Starting from flat, this requests a market buy for 0.01 BTC, a stop 2% below the reference price and a target 5% above it. Omitting the two exit quantities asks for protection sized to the entry. For a calculation reference of 60,000, the requested levels are 58,800 and 63,000 before exchange rounding. These are trigger levels. The fill price comes from the exchange.
After the alert, check the filled entry quantity and both protection results. Some markets attach the exits to the entry. Others place separate conditional orders. Market entries and inline protection sizes
Which price should the stop use?
Suppose an existing long has an entry price of 60,000 and the current price is 62,000. These are three alternative standalone stop instructions for that same position. Choose the row that matches where your strategy measures its stop.
| Measure from | Stop instruction | Trigger price |
|---|---|---|
| Current price | stoploss off 2% | 60,760 (2% below 62,000) |
| Position entry | stoploss off e2% | 58,800 (2% below 60,000) |
| A chart level | stoploss at 59500 | 59,500 (the supplied price) |
Use the current price when the alert means “place my stop this far from the market now.” Use the entry reference when a strategy measures the distance from the trade’s entry. A preceding market order can supply that reference within the same message. For a chart-defined level, at and @ accept an absolute price. Stop-loss syntax · Take-profit syntax
Protect an open long or short
Use a separate protection alert when you already hold the position. First check which stops or targets are already open. In the combined sl-or-tp command, the side names the closing order and 100%p requests the size of the selected position. Choose the message for the leg you hold.
For an existing long, sell to close
BTCUSDT on My_API_Key
if posLong continue
sl-or-tp short 100%p sl off e2% tp off e5%With a reported entry of 60,000, the stop is 58,800 and the target is 63,000. The position check gates the next command. The sell side is written as short in this pair.
For an existing short, buy to close
BTCUSDT on My_API_Key
if posShort continue
sl-or-tp long 100%p sl off e2% tp off e5%At the same entry price, the stop moves to 61,200 and the target to 57,000. Here long selects a buy to close. These examples assume a single open leg. For hedge mode, check how the exchange selects the leg and reports its size. Combined SL/TP and hedge-mode behavior
If one exit is already active, add just the missing leg. For example, on a long with a working target, the standalone stop in the entry-price row above adds a stop 2% below entry. Check its quantity alongside the target already on the exchange.
Take profit on part of a position
Suppose a one-way futures account holds a 0.02 BTC long and already has a stop. To take profit on half, request a quantity for the target on a market that supports partial exits.
BTCUSDT on My_API_Key
if posLong continue
takeprofit 50%p off e5%With 0.02 BTC open when the command runs, half is 0.01 BTC before rounding. If that target fills, check how much position remains and how much the existing stop covers. A second target placed immediately also uses the position size at placement. Waiting until the first target fills changes the base for that calculation.
For a ladder, Smart OCO can track the position and clean up remaining exits when it closes or reverses. The OCO guide shows how to group the orders. For a moving stop, use the trailing-stop activation and callback rules for the selected exchange. Multiple exits and Smart OCO · Trailing stops
Where to find the protection on the exchange
Match the symbol, position side, trigger price and protected quantity to the execution. These three futures integrations illustrate why a filled entry and an empty list of ordinary open orders can appear together.
| Market | Where to look |
|---|---|
| Bybit USDT futures | Inspect TP/SL on the position. Check whether the protection covers the full position or a partial quantity, and which trigger price type it uses. |
| Binance USD-M futures | Look for open conditional (algo) orders for the symbol. Match their trigger prices and sides to the requested stop and target. |
| OKX perpetual swaps | For exits attached to an entry, inspect the attached TP/SL details. For separately submitted exits, inspect pending algo orders and their quantities. |
For another market, check where its integration records conditional orders. Exchange Quirks · Bybit position TP/SL · Binance open algo orders · OKX algo orders
Frequently asked questions
Can I move an existing stop by sending a new stop price?
Replacement depends on the exchange and order type. A new instruction can create a second conditional order. Find the existing stop and its ID, use the amendment or targeted replacement supported for that market, then confirm the active trigger, quantity and any linked target.
When one exit fills, what happens to the other?
An exchange-native linked pair follows the exchange’s cancellation rules. With software OCO, Flipr.Cloud monitors the group and requests cancellation of its sibling. A fill can occur before that cancellation completes. After a fast move, check the remaining orders and position.
Do my exits stay active if Flipr.Cloud is offline?
An order already accepted by the exchange remains subject to its rules. The exchange can still trigger an accepted stop or target. Cleanup that depends on the Flipr.Cloud OCO monitor requires the service to be running.
The chart reached my target. Why is the position still open?
Compare the order’s trigger source with the price series on the chart. A mark-price trigger can differ from the last trade. Then check the order status. A take-profit limit can trigger and leave a limit order waiting for a fill.
Can I add a trailing stop to a market entry?
On supported futures markets, a market entry can also request a trailing stop. Its activation determines when tracking begins and its callback determines how far price can retrace. Check support for your exchange and inspect the trailing order separately from the fixed stop.
What if the entry filled but one protection failed?
Check the live position and which exit the exchange accepted. Use a standalone stoploss or takeprofit command for the missing leg and verify its size and trigger on the exchange. Repeating a filled market entry can increase the position.
