Skip to content
All library documents

Designing Hot-Swappable Strategy Settings for a Multi-Currency EA

Article MQL5 articles

Summary

This installment outlines a transition from embedding a multi-currency Expert Advisor’s strategy configuration in an initialization string to storing individual strategy instances in a separate database. The broader optimization workflow produces optimized single-strategy instances, groups selected candidates, and assembles configurations for a final EA. The proposed storage change is intended to let that EA load configuration pieces and replace them while running, including partial updates.

Partial replacement requires the system to track old and new instances together during a transition. Unchanged instances should retain their virtual positions, removed instances should close them correctly, and new instances should begin without prior positions. The article explains why replacing the entire configuration is problematic: virtual position recovery may depend on the number and order of strategies remaining identical. It presents the architecture and preparatory implementation work, but the supplied text is truncated before the complete mechanism and its validation are shown. The optimization database is also described as too large for the final EA’s runtime needs, motivating separate storage.

Key ideas

  • The proposed design stores individual strategy configurations in a separate database for the final EA.
  • Separating runtime configuration from large optimization databases limits the data the final EA must access.
  • Partial updates require preserving positions for unchanged strategies, closing removed instances, and initializing added ones.
  • Replacing the full configuration can disrupt virtual position recovery when strategy count or ordering changes.
  • The article describes the transition plan, but the available text does not show the complete implementation or its validation.

Tags

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