Skip to content
All library documents

Replaying Account Deal History to Test Alternative Stops

Article MQL5 articles

Summary

This article describes a MetaTrader workflow for examining completed account trades and testing hypothetical exit rules. An expert advisor first exports deal history, with optional filtering by symbol or magic number, to a file. A second run in the strategy tester reads that history and recreates its deals, allowing the trader to inspect entries and exits visually and modify stop-loss or take-profit handling.

The article reports an example in which replaying the trades with uniform stop-loss and take-profit settings changed the stated outcome from a loss of USD 550 to a profit of 590 points. These figures illustrate the proposed what-if process, not a general result: the settings were applied without tailoring them to each symbol, and the excerpt provides no evidence that the modified rules would hold up on new data. The method is a historical replay and sensitivity tool, so its conclusions depend on how faithfully the recorded deals and tester execution represent actual trading.

Key ideas

  • Export completed account deals to a file, then replay them in the strategy tester.
  • History can be filtered by symbol and magic number to focus the analysis.
  • The replay can support visual review of entries, exits, and recorded stop levels.
  • Alternative stop-loss and take-profit values can be applied to explore hypothetical outcomes.
  • The example’s changed result is not proof that the revised stops will generalize across instruments or future data.

Tags

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