Skip to content
All library documents

Configuring Trailing Stops to Manage Open Trades in MetaTrader 4

Article MQL5 code base

Summary

The document describes an automated trailing-stop manager for MetaTrader 4. It monitors open positions and, after a chosen profit condition is reached, moves the stop loss as price advances favorably. Users configure the activation point, the distance between price and stop, and the update step, which controls how often the stop follows the market. Trade filters can limit management to manual positions, a chosen strategy identifier, the current symbol, or all symbols.

The utility is presented as a position-management tool: it does not generate signals or open trades. A dashboard displays account and position information, and the manager can be started, stopped, or applied immediately. The document gives no backtest, execution-quality measurements, or comparison with fixed stops. Trailing rules can protect some accumulated gains while also closing a trade during a pullback; actual outcomes depend on market movement, broker execution, and the settings chosen.

Key ideas

  • A trailing stop activates after a position reaches a configured profit condition.
  • The stop follows favorable price movement according to user-selected distance and update-step settings.
  • Position filters can restrict management by trade type, strategy identifier, and symbol scope.
  • The utility manages existing trades and does not create entries or trading signals.
  • Execution and market conditions affect whether a trailing-stop rule preserves gains or exits during a pullback.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.