# Trailing (SLX)

<figure><img src="https://t24536365.p.clickup-attachments.com/t24536365/06eabe06-52a3-4b94-b242-390ca98299a1/image.png" alt=""><figcaption></figcaption></figure>

Finandy service offers 2 trailing types:

* Trailing Stop Loss at trigger price (traditional trailing)
* Trailing Stop Loss at Take Profit

<figure><img src="https://t24536365.p.clickup-attachments.com/t24536365/4c13d3b9-95c8-4979-89ae-9de7872bda2e/image.png" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Changing the stop-loss price manually while the SLX module is active will disable the SLX module.
{% endhint %}

## Currency price-based trailing

{% embed url="<https://youtu.be/S3hulE0TjPU>" %}

<figure><img src="https://t24536365.p.clickup-attachments.com/t24536365/f5b82264-9dad-43af-bfd5-076aa9be0541/image.png" alt=""><figcaption></figcaption></figure>

Trailing stop loss principles:

1. Currency pair price movement
2. Trailing stop repositioning
3. Trailing Trigger Points
4. Dynamic stop points
5. Stop loss activation

Settings:

<figure><img src="https://t24536365.p.clickup-attachments.com/t24536365/9d9558c9-f111-4ecc-b1d5-6db6e5beaed0/image.png" alt="" width="563"><figcaption></figcaption></figure>

### 1. Place at Breakeven, %

Stop Loss is automatically set to breakeven price when specified profit percentage is reached.

{% hint style="warning" %}
Disabled if field is blank.
{% endhint %}

### 2. Breakeven offset, %

The Stop Loss order is placed at a certain offset percentage from the breakeven price upon trigger activation in step 1. This feature can increase potential profit when the position is closed by Stop Loss.

{% hint style="warning" %}
If this field is blank, SLX will place an SL order at break-even price when the trigger in step 1 is activated.
{% endhint %}

### 3. Trailing activation (tracking)

Specify profit percentage for Trailing Stop activation. Disables SL module if active.

{% hint style="warning" %}
Disabled if field is blank.
{% endhint %}

{% hint style="info" %}
For example, if **0.5** is specified for a long position with a price of **100**, Trailing will be activated when the price is above **100.5**.
{% endhint %}

### 4. Price offset trigger (callback rate)

Percentage gap between SL price and current currency pair price.

<figure><img src="https://t24536365.p.clickup-attachments.com/t24536365/e6f43960-71c3-4c10-888f-f149cb951663/image.png" alt=""><figcaption></figcaption></figure>

1. Currency pair price movements
2. **VARIATION**
3. Trailing stop activation
4. Dynamic stop points
5. Price movement controlled by SLX module for Stop orders
6. Position closing

Stop Loss follows the trend for <mark style="color:green;">**Long**</mark> positions when moving up and remains fixed when moving down.

For <mark style="color:red;">**Short**</mark> positions, the Stop Loss follows the trend when moving down and remains fixed when moving up.

### 5. Minimum repositioning step

Minimum percentage difference between current and new price required for Stop Loss movement when trigger is activated.

<figure><img src="https://t24536365.p.clickup-attachments.com/t24536365/067b915d-1184-4f26-86c7-e7b71ca1365b/image.png" alt=""><figcaption></figcaption></figure>

1. Currency pair price movement
2. Previous Stop Loss price
3. New Stop Loss price
4. Stop Loss relocation event
5. Minimum relocation step - distance equal to or greater than the minimum Stop Loss step

{% hint style="info" %}
SL variations occur discreetly, no more than **0.02%** of current price. \
For example, if a variation occurred at a price of **100**, the next variation will occur when the price reaches **100.02.**
{% endhint %}

### 6. Min. position volume

If position volume is below the specified value, Trailing will not be activated and SL will not be adjusted to Breakeven.

#### Example

<figure><img src="https://t24536365.p.clickup-attachments.com/t24536365/d443f798-e274-4e42-afb3-a8bdcb7fc7bd/image.png" alt=""><figcaption></figcaption></figure>

In this example, **SLX** module will set the stop loss to breakeven or start trailing only if the position size is overs <mark style="color:blue;">**100.**</mark>

1\. Market buy for **50 USDT** volume.

| **PnL**                                | Position volume                             | Trailing |
| -------------------------------------- | ------------------------------------------- | -------- |
| <mark style="color:red;">**0%**</mark> | <mark style="color:red;">**50 USDT**</mark> | -        |

2\. Currency pair price increased, and trailing failed to start as position size was lower than the specified value.

| **PnL**                                  | Position volume                             | Trailing |
| ---------------------------------------- | ------------------------------------------- | -------- |
| <mark style="color:green;">**1%**</mark> | <mark style="color:red;">**50 USDT**</mark> | -        |

3\. Position averaged out, but trailing stop still inactive as profit has not reached the set trigger.

| **PnL**                                  | Position volume                                | Trailing |
| ---------------------------------------- | ---------------------------------------------- | -------- |
| <mark style="color:red;">**0.4%**</mark> | <mark style="color:green;">**200 USDT**</mark> | -        |

4\. Currency pair price has increased and trailing has been activated.

| **PnL**                                    | Position volume                                | Trailing |
| ------------------------------------------ | ---------------------------------------------- | -------- |
| <mark style="color:green;">**0.7%**</mark> | <mark style="color:green;">**200 USDT**</mark> | ✅        |

### 7. Trigger price

* **Current price -** follows currency pair current price.
* **Order book** - follows best bid/ask price in the order book. Protects against false price movements (squeezes).
* **Candle Timeframe** - SL is moved if candle's closing price deviates a certain percentage from the specified timeframe.

### 8. Order type

{% content-ref url="../../../trading/create-order-grid/order-types" %}
[order-types](https://docs.finandy.com/trading/create-order-grid/order-types)
{% endcontent-ref %}

### 9. Action on #CA

When placing a SL at breakeven level, averaging orders will be canceled or remain unchanged.

| Parameter         | Description                                                                             |
| ----------------- | --------------------------------------------------------------------------------------- |
| Disabled(default) | Averaging orders will remain active and NOT be canceled when the SLX module is enabled. |
| **Cancel #CA**    | All averaging orders will be cancelled when the SLX module is enabled.                  |

### 10. Update settings by signal

{% content-ref url="../update-settings-by-signal" %}
[update-settings-by-signal](https://docs.finandy.com/algo-trading/signals-tradingview/update-settings-by-signal)
{% endcontent-ref %}

### 11. Controlling an option in the signal

{% content-ref url="../controlling-an-option-in-the-signal" %}
[controlling-an-option-in-the-signal](https://docs.finandy.com/algo-trading/signals-tradingview/controlling-an-option-in-the-signal)
{% endcontent-ref %}

## Trailing based on executed Take Profits

{% embed url="<https://youtu.be/bhU3Vr2WaSI>" %}

The module creates or repositions a Stop Loss when a **Take Profit** order is executed on a position.

<figure><img src="https://t24536365.p.clickup-attachments.com/t24536365/99b29f46-95ab-4428-b3fa-2bfb1be0414a/image.png" alt="" width="563"><figcaption></figcaption></figure>

### **1.** Activation at BreakEven

When № Take Profit is executed, it moves to Break-even Point and continues to follow the executed Take Profit (if specified in set point #2).

For example, If you **activate Break-Even (BE)** at **1 TP** execution, the module will cancel current **Stop Loss (SL**) after the **first TP** is executed and set a **new SL** at the original break-even price.

### 2. Each TP

Once activated, each executed Take Profit will move Stop Loss closer to the trend based on table´s algorithm. If deactivated, Stop Loss will be set at break-even position´s price and will not be adjusted.

Assuming activation occurs from the second TP, the module will perform the same actions for any other TP that triggers it.

| **Event**          | Action                                                                                                               |
| ------------------ | -------------------------------------------------------------------------------------------------------------------- |
| Executed **ТP #2** | **SLX** module cancels all existing **SLs** and sets a new **SL** at break-even price with the specified order type. |
| Executed **ТP #3** | Cancels current **SL**, and set new **SL** at executed **TP** #1 price.                                              |
| Executed **ТP #4** | Cancels current **SL**, and set new **SL** at executed **TP** #2 price.                                              |
| etc                | ...and so on.                                                                                                        |

### 3. Order type

{% content-ref url="../../../trading/create-order-grid/order-types" %}
[order-types](https://docs.finandy.com/trading/create-order-grid/order-types)
{% endcontent-ref %}

### 4. Action on #CA

When placing a SL at breakeven level, averaging orders will be canceled or remain unchanged.

| **Parameter**         | **Description**                                                                         |
| --------------------- | --------------------------------------------------------------------------------------- |
| **Disabled**(default) | Averaging orders will remain active and NOT be canceled when the SLX module is enabled. |
| **Cancel #CA**        | All averaging orders will be cancelled when the SLX module is enabled.                  |

### 5. Check profit?

If enabled, SLX module will move the SL order only when there are profits in the position. If disabled, SLX module will move SL orders regardless of profit or loss.

### 6. Updating settings by signal

{% content-ref url="../update-settings-by-signal" %}
[update-settings-by-signal](https://docs.finandy.com/algo-trading/signals-tradingview/update-settings-by-signal)
{% endcontent-ref %}

### 7. Controlling an option in the signal

{% content-ref url="../controlling-an-option-in-the-signal" %}
[controlling-an-option-in-the-signal](https://docs.finandy.com/algo-trading/signals-tradingview/controlling-an-option-in-the-signal)
{% endcontent-ref %}

## Additionally

* SLX activation is performed relative to the breakeven level for the position, but without funding. In case of negative funding for a position, closing a position through the SLX module may result in a loss.\
  In the case of a long stay in a position, the influence of deduction/accrual for funding on the middle line is controlled by the trader independently.

**Do you have any questions? We can help you in our Telegram chat room.**

{% embed url="<https://t.me/finandy>" %}
