Coordinating Multi-Currency EAs with Portfolio-Level Risk Controls
Summary
The article presents an MQL5 architecture for coordinating multiple symbol-specific trading agents through a central Portfolio Controller. The controller tracks shared exposure, publishes risk limits and halt state, and applies portfolio-level safeguards; each agent retains its own signal logic but checks the shared constraints before placing orders. This separates trade decisions from capital governance and addresses the risk that independent EAs build correlated positions without awareness of one another.
It compares terminal global variables, named pipes, and shared files for communication, recommending global variables for scalar limits and flags and pipes for periodic structured updates. It also specifies variable ownership, a readiness handshake, timer-based controller updates, and a fallback degraded mode. The article outlines the design and code framework but does not provide performance evidence. It notes that the initial budget calculation is equity-based rather than volatility-adjusted, and that signal evaluation and position sizing are simplified; later installments are intended to extend these components.
Key ideas
- A central controller can enforce aggregate risk limits across otherwise independent symbol agents.
- Agents should check shared risk state before submitting orders and report their positions back to the controller.
- Global variables suit simple shared values, while pipes and files support more structured communication with added overhead.
- A readiness handshake helps prevent agents from trading against uninitialized controller state.
- Timer updates simplify coordination but leave portfolio state potentially one update interval behind.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.