Configuring an Expert Advisor to Trail Stop-Loss and Take-Profit Orders
Summary
This document explains a trading platform Expert Advisor that manages protective orders on open positions. When a position lacks a stop-loss or take-profit, the tool can place an initial order at a configured distance. It can then adjust either order as price moves, using separate trailing distances and a minimum step before modification. Settings can restrict management by position side, symbol, strategy identifier, or ticket.
Additional controls determine whether trailing is allowed while a position is losing, set a breakeven threshold, and account for spread when calculating order distances. An example configuration uses an initial stop and target, trails the stop, and disables take-profit trailing and trailing in losing territory. The document describes order-management mechanics rather than an entry strategy, and gives no test results or guidance on selecting suitable distances. Behavior will depend on instrument point sizes, broker execution rules, and the chosen settings.
Key ideas
- The advisor can add initial stop-loss and take-profit orders when an open position lacks them.
- Separate distances and a trailing step control when protective orders are moved.
- Position filters can limit management by side, symbol, identifier, or ticket.
- Trailing in losing territory, breakeven handling, and spread adjustment are configurable.
- The document describes mechanics but supplies no performance evidence or parameter selection method.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.