Building a Multi-Currency, Multi-Strategy Expert Advisor
Summary
The article explains how to combine several strategies and symbols in one MetaTrader 5 Expert Advisor (EA) to assess their performance together. It organizes each strategy’s symbol-specific settings and indicator handles in arrays, then processes them in loops. A timer event allows the EA to evaluate symbols without depending on ticks arriving for the chart’s symbol. The article also describes initialization checks for symbol availability and duplicates, and configuring trade objects and position sizing inputs.
Its testing approach compares each strategy and symbol separately with a combined run, so traders can examine how overlapping trades and drawdowns affect account-level results. The examples use two strategies and multiple currency pairs, but the structure is presented as extensible. A key caveat is that combined results for strategies trading the same symbol may differ from the sum of isolated tests: MetaTrader 5 represents that symbol’s net position as a single position. The article assumes parameter optimization has already been done and provides no detailed numerical comparison of the reported test results.
Key ideas
- Organize symbol-specific parameters and indicator handles in arrays, then iterate over them for each strategy.
- A timer-based event can evaluate multiple symbols independently of ticks on the chart symbol.
- Check that enabled symbols are available and are not duplicated within a strategy before trading.
- Combined testing reveals interactions and overlapping drawdowns that separate strategy tests may not show.
- On a netting account, strategies trading the same symbol share a combined position, so results can differ from isolated tests.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.