# Take profit / Stop loss - Distances and Validation

## Overview

Take Profit (**TP**) and Stop Loss (**SL**) can be set when:

- opening a **new order**
- **modifying** an existing order

When TP or SL is enabled, the platform:

1. **Automatically fills default values**
2. **Validates minimum distance** from the reference price
3. **Clears the value** if the option is disabled

The rules depend on the **symbol group**.

<table id="bkmrk-symbol-group-distanc"><thead><tr><th>Symbol group</th><th>Distance type</th></tr></thead><tbody><tr><td>**Crypto**</td><td>Percentage</td></tr><tr><td>**Other instruments** (Forex, indices, commodities, etc.)</td><td>Pips / points</td></tr></tbody></table>

---

# Symbol Groups

The system determines the rule set based on the **symbol group**.

<table id="bkmrk-group-behavior-crypt"><thead><tr><th>Group</th><th>Behavior</th></tr></thead><tbody><tr><td>**Crypto**</td><td>Percentage-based TP/SL</td></tr><tr><td>**Other groups**</td><td>Pip / point-based TP/SL</td></tr></tbody></table>

---

# Default TP / SL Values

When a user enables **Take Profit** or **Stop Loss**, the system automatically inserts a default value.

<table id="bkmrk-asset-class-side-def"><thead><tr><th>Asset class</th><th>Side</th><th>Default Take Profit</th><th>Default Stop Loss</th></tr></thead><tbody><tr><td>**Crypto**</td><td>BUY</td><td>Ask + 1%</td><td>Ask − 1%</td></tr><tr><td>**Crypto**</td><td>SELL</td><td>Bid − 1%</td><td>Bid + 1%</td></tr><tr><td>**Other instruments**</td><td>BUY</td><td>Ask + 100 pips</td><td>Ask − 100 pips</td></tr><tr><td>**Other instruments**</td><td>SELL</td><td>Bid − 100 pips</td><td>Bid + 100 pips</td></tr></tbody></table>

### Important

- Defaults are intentionally **larger than the minimum allowed distance**.
- This ensures automatically generated TP/SL values are **always valid**.

---

# Minimum Distance

TP and SL must be placed at least a **minimum distance** away from the reference price.

<table id="bkmrk-asset-class-minimum-"><thead><tr><th>Asset class</th><th>Minimum distance</th></tr></thead><tbody><tr><td>**Crypto**</td><td>**0.1%** of reference price</td></tr><tr><td>**Other instruments**</td><td>**1 pip**</td></tr></tbody></table>

The system prevents users from placing TP or SL inside this restricted zone.

---

# Validation Rules

### BUY Orders

<table id="bkmrk-rule-take-profit-mus"><thead><tr><th>Rule</th></tr></thead><tbody><tr><td>Take Profit must be **above** the reference price</td></tr><tr><td>Stop Loss must be **below** the reference price</td></tr></tbody></table>

Additionally:

- TP must be at least **minimum distance above**
- SL must be at least **minimum distance below**

---

### SELL Orders

<table id="bkmrk-rule-take-profit-mus-1"><thead><tr><th>Rule</th></tr></thead><tbody><tr><td>Take Profit must be **below** the reference price</td></tr><tr><td>Stop Loss must be **above** the reference price</td></tr></tbody></table>

Additionally:

- TP must be at least **minimum distance below**
- SL must be at least **minimum distance above**

---

# Reference Price

The **reference price** used for TP/SL calculation depends on context.

<table id="bkmrk-context-order-type-r"><thead><tr><th>Context</th><th>Order type</th><th>Reference price</th></tr></thead><tbody><tr><td>New order</td><td>MARKET</td><td>Current **Ask** for BUY, **Bid** for SELL</td></tr><tr><td>New order</td><td>LIMIT</td><td>Limit price entered in the form</td></tr><tr><td>Modify order</td><td>MARKET</td><td>Order execution price</td></tr><tr><td>Modify order</td><td>LIMIT</td><td>Updated limit price (if edited), otherwise existing order price</td></tr></tbody></table>

---

# Example Calculations

### Crypto Example

Reference price:

```
BTC = 50,000
```

<table id="bkmrk-value-result-default"><thead><tr><th>Value</th><th>Result</th></tr></thead><tbody><tr><td>Default TP</td><td>50,500</td></tr><tr><td>Default SL</td><td>49,500</td></tr><tr><td>Minimum distance</td><td>50</td></tr></tbody></table>

---

### EUR/USD Example

Reference price:

```
Ask = 1.0850
```

<table id="bkmrk-value-result-default-1"><thead><tr><th>Value</th><th>Result</th></tr></thead><tbody><tr><td>Default TP</td><td>1.0950</td></tr><tr><td>Default SL</td><td>1.0750</td></tr><tr><td>Minimum distance</td><td>0.0001</td></tr></tbody></table>

---

### USD/JPY Example

Reference price:

```
Ask = 150.25
```

<table id="bkmrk-value-result-default-2"><thead><tr><th>Value</th><th>Result</th></tr></thead><tbody><tr><td>Default TP</td><td>151.25</td></tr><tr><td>Default SL</td><td>149.25</td></tr><tr><td>Minimum distance</td><td>0.01</td></tr></tbody></table>

---

# Where These Rules Apply

## Order Form (New Orders)

When creating a new order:

- Default TP/SL values are inserted when enabled
- Validation ensures minimum distance rules are respected
- TP/SL values are cleared when disabled

---

## Modify Order

When editing an existing order:

- Default TP/SL values follow the same rules
- Reference price is based on the order price
- Validation rules remain identical

---

# Key Principles

The system follows three main principles:

1. **Automatic defaults**  
    When TP/SL is enabled, reasonable default levels are provided.
2. **Minimum distance protection**  
    TP/SL cannot be placed too close to the reference price.
3. **Consistency across workflows**  
    The same rules apply when creating and modifying orders.

---

# Summary

<table id="bkmrk-feature-crypto-other"><thead><tr><th>Feature</th><th>Crypto</th><th>Other Instruments</th></tr></thead><tbody><tr><td>Default TP</td><td>±1%</td><td>±100 pips</td></tr><tr><td>Default SL</td><td>∓1%</td><td>∓100 pips</td></tr><tr><td>Minimum distance</td><td>0.1%</td><td>1 pip</td></tr><tr><td>Reference price</td><td>Ask / Bid</td><td>Ask / Bid</td></tr></tbody></table>

Defaults are intentionally **larger than the minimum allowed distance**, ensuring automatically generated TP/SL values always pass validation.