> For the complete documentation index, see [llms.txt](https://docs.coinlocally.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coinlocally.com/perpetual-contracts/functions/take-profit-stop-loss-tp-sl.md).

# Take Profit, Stop Loss TP/SL

## **Take Profit / Stop Loss (TP/SL) Orders**

### **What is a Take Profit / Stop Loss Order?**

A **Take Profit / Stop Loss (TP/SL) Order** is a conditional order that automatically closes a position when a **predefined trigger price** is reached. It helps traders **lock in profits** or **limit potential losses** without needing to monitor the market continuously.

> ✅ Before triggering, the TP/SL order does **not** occupy margin.\
> ❌ If there are insufficient funds when the order is triggered, it may **fail to execute**.

### **Types of TP/SL Orders**

#### **1. Limit Take Profit / Stop Loss**

* The order is placed at a **specific price** when the trigger condition is met.
* May **not fill immediately** if the market does not reach your set limit price.

**Parameters Required:**

* Trigger Price
* Order Price
* Order Quantity

**Pros:**

* You control the price of execution.
* Limits slippage.

**Cons:**

* The order **may not be filled** if the market moves away.

> **Tip:** To increase the success rate, set the **order price slightly better** than the trigger price.\
> Example: For a long position TP at $60,000, use a limit price of $59,900.

#### **2. Market Take Profit / Stop Loss**

* The order is placed at the **market price** once the trigger condition is met.
* Designed for **immediate execution**.

**Parameters Required:**

* Trigger Price
* Order Quantity

**Pros:**

* Executes quickly once triggered.

**Cons:**

* No control over the exact fill price.
* May cause **slippage** in volatile or illiquid markets.

### **Recommended Use Cases**

| Scenario        | Recommended Order Type | Reason                                 |
| --------------- | ---------------------- | -------------------------------------- |
| Take Profit     | Limit Order            | Ensures profits at a known price       |
| Stop Loss       | Market Order           | Ensures fast exit to reduce losses     |
| Small Position  | Market Order           | Low slippage risk                      |
| Large Position  | Limit or Split Orders  | Reduce slippage risk in poor liquidity |
| Volatile Market | Limit Order            | Avoid trigger from rapid price spikes  |

### **TP/SL Order Lifecycle**

#### 1. **Pending Trigger**

* After submission, the TP/SL order waits in the **Scheduled Orders List**.
* No margin is locked during this phase.
* The order remains pending until the trigger price is hit.

#### 2. **Triggered**

* When the **latest traded price** meets the condition, the order is triggered.
* The system submits the order (limit or market) according to your settings.

#### 3. **Order Submission**

* The TP/SL becomes an active order and appears in the **Open Orders** or **Order History** list.

### **Trigger Rules**

#### **Long Position (Sell to Close)**

| Type        | Trigger Condition                                    |
| ----------- | ---------------------------------------------------- |
| Take Profit | Latest Price ≥ Trigger Price                         |
| Stop Loss   | Latest Price ≤ Trigger Price, and deviation is < 10% |

#### **Short Position (Buy to Close)**

| Type        | Trigger Condition                                    |
| ----------- | ---------------------------------------------------- |
| Take Profit | Latest Price ≤ Trigger Price                         |
| Stop Loss   | Latest Price ≥ Trigger Price, and deviation is < 10% |

> In **unstable markets**, the system includes a **"pin protection" mechanism**.\
> If the deviation between the **latest price** and the **mark price** exceeds **10%**, stop-loss orders **will not trigger**, preventing false activation from price spikes.

***

### **Trigger Failure Scenarios**

* **Insufficient Margin**: If you lack sufficient funds to place the order, it will be unsuccessful.
* **Strong Liquidation**: If the position is already being closed by the system's forced liquidation engine, the TP/SL trigger may fail.
* **Expired Orders**: TP/SL orders automatically expire after **14 days** if not triggered, which can be customized in the settings.

### **Examples**

#### **Limit Take Profit**

* **Date**: March 5, 2021
* **Entry**: Long 10 BTC at $50,000
* **Plan**: Take profit in 2 batches at $58,000 and $60,000

**Order 1:**

* Trigger: $58,000
* Limit Price: $57,900
* Quantity: 5 BTC

**Order 2:**

* Trigger: $60,000
* Limit Price: $60,000
* Quantity: 5 BTC

**Outcome**:\
The price reached $60,000 but fell rapidly. Order 1 filled, Order 2 triggered but **not filled**—the price dropped below $60,000 before the order could execute.\
**Lesson**: Set limit prices slightly better than trigger prices (e.g., $59,900 instead of $60,000).

#### **Market Stop Loss**

* **Date**: March 14, 2021
* **Entry**: Long 1,000 BTC at $60,000
* **Stop Loss Plan**: Trigger at $54,000

**Order:**

* Trigger Price: $54,000
* Order Type: Market
* Quantity: 1,000 BTC

**Outcome**:\
On March 23, BTC fell to $54,000. The stop order was triggered, and the system sold the entire position at an **average price of $53,600** due to **market slippage**.\
**Lesson**: Use **limit orders or batch market orders** for large stop-loss positions to avoid slippage.

### **Summary**

* **TP/SL Orders** automate trade exits for both profit-taking and risk management.
* Choose **'Limit' for precision, 'Market'** for speed.
* Utilize buffer zones to enhance fill rates on limit orders.
* Consider **batch orders** for large positions in volatile markets.
