Take Profit & Stop Loss Orders (TP/SL)
Take Profit (TP) and Stop Loss (SL) orders allow you to close your position once a certain price or profit/loss level has been reached.
TP/SL orders are currently only available on futures and use the last traded price (LTP) as the trigger price.
By default, TP/SL orders are sent as market orders upon triggering. Users can set a limit price for their TP/SL orders to control slippage. When a limit price is defined, a limit order at the specified price is created once the trigger price is reached.
Entire Position vs Partial Position TP/SL
Backpack offers two types of TP/SL orders: Entire Position and Partial Position.
Entire Position
Entire Position TP/SL means that the quantity of the order is set to 100% of the outstanding position size.
If a user sets up an Entire Position TP/SL for an existing position and later increases the size of that position, the TP/SL order will cover the entire updated amount when the trigger price is reached.
Entire Position TP/SL can only be created after the position has been opened.
Partial Position
Partial Position TP/SL have a fixed quantity. If a user sets up a Partial Position TP for 1 SOL, and they later increase their position size by an additional 0.5 SOL, the TP will only execute 1 SOL.
Moreover, in the case that a Partial Position TP/SL size is greater than the quantity of the outstanding open position (perhaps because the user reduced the position manually), the TP/SL will fill no more than that the open amount upon triggering.
Setting up TP/SL orders
There are two ways to create TP/SL orders:
On order entry (i.e. when creating an order)
On existing positions
Creating a TP/SL on order entry
When submitting an order, you have the option to specify a TP/SL price by checking the TP/SL box. Once you place your order, your TP/SL becomes associated with the parent order and will be created only when the parent order gets filled or partially filled.
All TP/SL orders created on order entry are considered Partial Position. This means that if you open a 1 SOL-PERP position with a TP/SL appended to it, the quantity of the TP/SL order will only be 1 SOL.
If you submit another order that increases your position size, you must specify a TP/SL price on that order as well if you want it to be covered by a TP/SL. The size of the existing TP/SL order will not increase automatically.
You can always create an Entire Position TP/SL after the position is opened, which will cover all subsequent orders for that position.
Additionally, if you submit a limit order that sits on the orderbook with a TP/SL associated with it, the size of the open TP/SL order will match the amount that has been filled. This means that if only half of your position has been filled, that amount will be the amount of the open TP/SL order. As the filled size increases, the size of the TP/SL order increases proportionally.
To illustrate all of the above, here’s an example:
SOL-PERP is currently trading at $130
User submits a 10 SOL-PERP limit order at $125 (the parent order), with a TP order of $132.
The parent order is placed on the orderbook. The TP order is associated with the parent order, but hasn’t been formally created as the parent order hasn’t been filled yet. This means that if the price of SOL goes up to $132, nothing happens because there isn’t a position open yet.
Price hits $125. The parent order gets partially filled by 5 SOL. A partial TP order at $131 with only a quantity of 5 SOL is created (rather than the full 10).
Price dips below $125, which means that the remaining 5 SOL is filled, and size of the TP order at $131 increases by 5 (for a total of 10).
Price roses above $131. TP is triggered and a market order is sent for 10 SOL-PERP.
Setting up TP/SL on open positions
Once a position is open, you can set up a TP/SL in the Positions tab by clicking on the edit icon. A modal will show up where you can create an Entire Position and/or Partial Position TP/SL.
If you close a position manually, all associated TP/SL orders are cancelled as well.
Additional Notes
While the Last Traded Price is used as the trigger/reference price for TP/SL, please note that the margin system uses the Mark Price for all equity calculations, as well as the estimated liquidation price.
For maximum flexibility, users are able to set up SL orders below the estimated liquidation price.
You may create Conditional Orders that are not associated with any position.
Last updated