Skip to content
All library documents

Designing a Closing Manager for Multi-Strategy Trading Systems

Article MQL5 articles

Summary

This article outlines a separate closing manager for a multi-currency Expert Advisor. The module is intended to close virtual positions across strategies when account-level profit or loss limits are reached, and to support profit trailing and a breakeven threshold. The author favors keeping this functionality independent of the existing risk manager, which closes real positions, so the new module can operate optionally without changing that component’s responsibilities. The proposed controls include a reference balance, fixed-amount or percentage thresholds, trailing activation and step settings, and a breakeven activation level.

The article also describes supporting changes to the EA architecture, such as adding a method that closes positions across strategies and displaying operational information in a chart dialog. It discusses project and library repository organization, as well as compatibility fixes. The material focuses on requirements and implementation preparation; it does not provide performance tests showing that the closing rules improve trading outcomes. The contribution is chiefly a system-design pattern for coordinating account-level exits across multiple strategies while keeping modules decoupled.

Key ideas

  • A dedicated closing manager can coordinate account-level exits across real and virtual positions.
  • Profit and loss thresholds can be specified as fixed deposit-currency amounts or as percentages of a reference balance.
  • Trailing profit raises the protected profit level as gains grow, while breakeven protection stays fixed after activation.
  • Keeping the closing manager separate preserves the risk manager’s narrower role and allows optional use.
  • The article describes architecture and implementation preparation rather than measured trading performance.

Tags

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