Skip to content
All library documents

Virtual Positions for Coordinating Multi-Strategy Expert Advisors

Article MQL5 articles

Summary

This article describes restructuring a multi-strategy Expert Advisor so strategy instances track virtual positions instead of placing market orders independently. A receiver collects the strategies’ requested volumes by symbol and converts their combined exposure into real positions, applying scaling to help keep portfolio drawdown within a target. This can let small strategies participate even when their individually scaled volume would fall below a broker’s minimum size.

The implementation introduces virtual-order storage and change tracking in the strategy class, plus a receiver responsible for translating virtual exposure into market positions. The article reports a comparison involving nine strategy instances and says some results improved, including profit, drawdown, Sharpe ratio, and profit factor. It does not provide enough detail here to establish that the approach reliably improves performance. The example uses fixed position sizes and does not yet handle pending orders, money management, or strategies spanning multiple symbols. It presents the architecture as an early working implementation, with further design work still needed.

Key ideas

  • Strategies can maintain virtual positions while a central receiver handles real market execution.
  • Aggregating requested volumes allows strategy exposure to be scaled as a group against a drawdown target.
  • A shared receiver can help strategies remain eligible when their individual scaled volumes fall below broker minimums.
  • The described implementation focuses on market positions and fixed-volume trading.
  • The reported performance comparison is limited and does not establish general effectiveness.

Tags

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