Skip to content
All library documents

Managing Trade Exits with Profit Thresholds and a Trailing Stop

Article MQL5 code base

Summary

The document outlines a MetaTrader Expert Advisor approach for managing open positions on the current symbol. On each tick, it checks whether a position has reached configured profit or loss thresholds and closes it when either threshold is met. If neither threshold is reached, it adjusts the stop loss in the direction of favorable price movement, updating the stop only when the proposed level is more favorable than the existing one.

The description identifies risk percentage, profit percentage, and trailing-stop points as inputs, but it does not state their values or show the underlying code. It offers no backtest, execution analysis, or evidence that the rules improve results. The explanation also leaves important implementation details unclear, including how thresholds are calculated, whether they account for costs, and how the trailing distance behaves across instruments. It is a basic exit-management outline rather than a complete or validated trading system.

Key ideas

  • The described Expert Advisor checks matching open positions on each incoming tick.
  • It closes a position when its configured profit or loss threshold is reached.
  • If neither threshold is met, it moves the stop loss to a more favorable level as price advances.
  • The document gives no parameter values, backtest evidence, or detailed handling of trading costs.

Tags

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