Skip to content
All library documents

A File-Based Virtual Tester for Multi-Symbol Hedge Strategies

Article MQL5 articles

Summary

The article proposes a workaround for testing a multi-symbol hedge Expert Advisor in a platform tester that cannot open orders on another symbol. Its method separates the process into data collection, simulated trading, and performance visualization. An EA exports daily opening prices and time-stamped tick prices for each leg; a second EA reads those files, applies the hedge rules and calculates virtual trade results; a chart indicator then displays the resulting performance curve. An example uses opposing positions in EURJPY and GBPJPY, with a daily opening schedule, hourly price sampling, a profit target, and daily resets. The article explains that the recorded price fields must reflect whether each simulated leg is a buy or sell, and suggests splitting long test periods into smaller batches. The author presents this as an approximation rather than a result guaranteed to match the platform's native tester. Its accuracy depends on the data captured, price assumptions, timing, costs, and whether the exported variables adequately represent the strategy; it does not provide independent validation of the simulated results.

Key ideas

  • A multi-symbol hedge can be simulated by exporting price data and applying the trading rules outside the native single-symbol test flow.
  • The proposed workflow has separate stages for recording prices, generating virtual trades, and plotting results.
  • Price files need time alignment and side-appropriate prices for each hedge leg.
  • The example tests two currency pairs with daily entries and hourly observations under specified exit and reset rules.
  • The virtual performance curve is an approximation and may differ from a native tester or live trading.

Tags

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