Reducing EA Optimization Searches Across Timeframes and Symbol Sets
Summary
This article presents ways to make MetaTrader 5 Expert Advisor optimization more selective. Instead of enumerating every available timeframe, the author proposes exposing a curated set of timeframes as an input parameter, so early searches compare broad choices and later runs can refine promising areas. The same approach represents individual currency pairs or predefined groups of pairs with integer input values, since string inputs cannot be optimized directly.
For multi-symbol systems, the article describes parsing the selected pair list into an array, keeping symbol-specific state and requesting prices and other properties by symbol. It also discusses dispatching work differently for single-symbol and multicurrency EAs, and rejecting invalid parameter combinations early to avoid wasted optimization passes. These are engineering techniques for narrowing a search and managing multi-symbol EA behavior; they do not establish that the best in-sample timeframe or symbol set will remain profitable. The discussion includes code examples but no comparative performance study or evidence of out-of-sample results.
Key ideas
- Use a curated timeframe input to reduce the number of optimization variations in an initial search.
- Represent candidate symbols and symbol groups with integer input values that map to string lists.
- Store symbol-specific data in arrays when an EA operates across multiple instruments.
- Use symbol-aware market data functions for prices and contract properties in multicurrency logic.
- Reject invalid parameter combinations before running full optimization work.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.