Skip to content
All library documents

Account-Balance Percentage Rules for Closing Trades

Article MQL5 code base

Summary

The document describes an expert adviser that checks the current account balance against user-defined risk and profit percentages. It can close trades when either percentage condition is reached, offering a basic way to manage open positions through account-level thresholds. The description does not explain how the thresholds are calculated, whether they apply to individual trades or the account as a whole, or how the adviser handles multiple open positions.

The author notes that an earlier demonstration version opened one sell position at a time, but that behavior was removed from the money-management version. No performance results, testing details, or risk controls are provided, so the document explains a tool’s intended function rather than establishing its effectiveness. Traders would need to inspect the implementation and verify its behavior before relying on it for automated trade management.

Key ideas

  • The adviser uses current account balance and user-entered risk and profit percentages to manage trade exits.
  • It can close trades after a configured profit or loss condition is met.
  • A sell-position demonstration feature from an earlier version was removed from this version.
  • The document provides no test results or detailed rules for applying thresholds.

Tags

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