# Take-Profit and Stop-Loss (TP/SL)

### What Are TP/SL?

**Take Profit (TP):** A Take Profit order automatically closes a position when the price reaches a predetermined profit level. This ensures that traders can lock in gains without constantly monitoring the market. TP orders are beneficial in volatile markets with rapid price movements.

**Stop Loss (SL):** A Stop Loss order, on the other hand, is designed to minimize losses. It automatically closes a position when the price falls to a specified level. This helps traders protect their capital and manage risk in unpredictable market conditions.

### Benefits of Using TP/SL

**Risk Management:** TP/SL orders help manage risk by limiting potential losses and securing profits. **Emotion-Free Trading:** Automating these orders reduces the emotional impact of trading decisions, ensuring a more disciplined approach. **Time Efficiency:** Traders do not need to monitor the market constantly, as these orders execute automatically. **Improved Profitability:** Properly setting TP/SL can enhance trading performance by optimizing entry and exit points.

### Key Features of TP/SL

**Setting TP/SL with Order Placement:** TP/SL triggers can be defined when placing an order. Once the order is executed and converted into a position, the specified TP/SL triggers are automatically associated with it. **Creating TP/SL for Existing Positions:** A TP/SL trigger can be created for positions that are already open. **Volume Customization:** Users can create a single TP/SL trigger for the entire position volume or specify a quantity (qty) derived from the position. **Order Cancellation:** If an order is canceled, any TP/SL triggers linked to it are also automatically canceled.

### Calculations and Execution

**Restrictions on Full-Position TP/SL:** Only one TP and one SL can exist for the entire position. If a user attempts to create a second trigger, it will replace the first. **Partial TP/SL:** Users can set multiple partial TP/SL triggers, provided their total volume does not exceed the position size. Partial TP/SL triggers can coexist with a single full-position TP/SL without conflict. **Position Integrity:** The position should not be reversed upon executing the TP/SL order. When the backend detects a trigger price for TP/SL, it calculates the executable volume based on the current position. All other TP/SL triggers are canceled if this volume equals the entire position.

### User-Defined Trigger Calculations

**ROI (Return on Investment):** The trigger price is calculated based on a specified percentage of profit. For example, if a user wants a 10% profit, the position will close once it achieves this profit. **Change %:** The trigger price is set based on the percentage change in the coin's price. For instance, setting a 10% trigger when Bitcoin’s current price is 100,000 USDT will activate the trigger at 110,000 USDT. **P\&L (Profit and Loss):** A specified profit or loss in USDT determines the trigger price. For example, if the user wants the position to close after earning or losing X USDT, the system calculates and sets the corresponding trigger price.

### Dependency of Orders on Positions

**Replacing Existing TP/SL Triggers:** If a position already has TP/SL triggers for a trading pair, and a new order with TP/SL for the same pair is satisfied, the new TP/SL replaces the previously set triggers for the pair.

{% hint style="info" %}
***Example:***\
\_User has a 10 BTC position with TP/SL at 90,000 USDT for 100% of the volume and places a new order to buy 2 BTC with a TP/SL at 91,000 USDT for the entire position, the TP/SL updates to 91,000 USDT after one BTC from the order is filled and the other is canceled.\_
{% endhint %}

**Complementing Existing TP/SL with Partial Orders:** If a position already has TP/SL triggers and a new partial order TP/SL is set, they complement each other.

{% hint style="info" %}
***Example:***\
\_User has a 10 BTC position with TP/SL at 90,000 USDT for 100% of the volume and sets a new TP/SL for 10% of the volume at 89,000 USDT, the system creates two TP/SL orders: one for 10% of the volume at 89,000 USDT and another for 90% of the volume at 90,000 USDT.\_
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.evedex.com/key-features-and-components/trading-platform-and-matching-engine/take-profit-and-stop-loss-tp-sl.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
