Skip to content
All library documents

Closing All Trades at a Fixed or Percentage Profit Target

Article MQL5 code base

Summary

The document describes a simple expert advisor that monitors the combined profit or loss of open trades after it is attached to a chart. It offers two modes: close all trades once profit exceeds a configured fixed amount, or close them once profit exceeds a configured percentage threshold. In either mode, the action applies to all trades rather than to individual positions.

This is a basic profit-taking rule, not a complete trading strategy. The description gives no details about how profit is calculated, which account or instrument scope is monitored, how the thresholds are set, or how losses are managed. It also provides no backtest, execution analysis, or evidence that closing every trade at a target improves returns. Users would need to establish the advisor’s precise behavior and account for costs and position interactions before relying on the rule.

Key ideas

  • The advisor monitors the profit or loss of open trades while connected to a chart.
  • A fixed monetary profit threshold can trigger closure of all trades.
  • A percentage profit threshold is offered as an alternative trigger.
  • The description does not specify loss controls, threshold selection, or tested performance.

Tags

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