# Trailing Optimization

{% hint style="danger" %}
**Normal Trailing inputs need to be empty for this section to work**
{% endhint %}

This special input group lets you optimize trailing in three independent steps:

* **Start** (when trailing activates)
* **Stop Loss or Distance** (how far the trailing stop is placed)
* **Step** (how often the trailing stop moves)

These inputs are numeric, so the Strategy Tester can optimize them.

Each step (1, 2, and 3) allows you to test different trailing styles during optimization.\
\
Step 1 (Start, Stop Loss, Step) :  Use when you want to optimize a simple single-stage trailing configuration.\
Step 2 (Start, Stop Loss, Step) : This group allows you to test alternate trailing behavior.\
Step 3 (Start, Stop Loss, Step) : This group is useful for deeper optimization or trying multiple trailing styles across different market conditions.

{% hint style="info" %}

## How to Use Trailing Optimization

**The levels ARE combined — just like in the main trailing system.**\
This optimization block is designed to simulate the same multi‑stage trailing logic described in the manual.

#### How it behaves (same as live trailing)

* **Level 1** activates when profit reaches Level 1 Trailing Start and applies its trailing distance/step.
* **Level 2** activates when profit reaches Level 2 Trailing Start, overriding Level 1 with its own trailing distance/step.
* **Level 3** activates when profit reaches  Level  3 Trailing Start, overriding Level 2.

Each higher level only becomes active when price reaches the corresponding trigger.

#### Example (same logic as the manual)

Trailing Start = **1000, 2000,2500**\
Trailing Stop Loss = **700, 600,500**\
Trailing Stop Loss = 3**0, 50, 100**\
Step 1 (Start= 1000,  Stop  Loss = 700, Step = 30) \
Step 2 (Start= 2000,  Stop  Loss = 600, Step = 50) \
Step 3 (Start= 2500,  Stop  Loss =500, Step = 100)&#x20;

**Result:**

* From **+1000 points** → SL distance becomes **700 points and step 30** (Level 1 active)
* From **+2000 points** → SL distance becomes **600 points and step 50** (Level 2 active, overriding Level 1)
* From **+2500 points** → SL distance becomes **500 points and step 100** (Level 3 active, overriding Level 2)
  {% endhint %}

{% hint style="info" %}

#### Purpose in Optimization

Because the original live trailing uses strings (not optimizable), these numeric fields let you:

* Optimize each stage separately (Start / Distance / Step)
* Build multi-stage trailing structures
* Compare different multi-step configurations

After optimization, you take the best combination of levels and manually place them into the live trailing string format.

These inputs **are combined** exactly like the real EA’s multi-stage trailing — only difference is they are numeric for MT5 optimization.

Use them to discover the most efficient multi-level trailing behavior. for Start, Distance, and Step — then manually enter those values into the live trailing configuration.
{% 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://smartchoise.gitbook.io/smartchoise-manual/options/strategy-tester-backtest-and-optimization-only/trailing-optimization.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.
