Skip to content
All library documents

Testing Strategy Reversals with a Same-Account Mirror EA

Article MQL5 code base

Summary

The document describes an Expert Advisor that mirrors trades from selected strategies or manual trades within the same hedging account. In its default inverse mode, it swaps buy and sell directions, reverses stop-loss and take-profit roles at the same price levels, and maps pending order types to their opposite counterparts. It can also copy position sizing, pending orders, and partial closes, while tagging mirrored trades so their results can be reviewed separately.

Its main lesson is that reversing a losing strategy on paper can misstate live results. The mirror pays its own spread and commissions, enters after the source, may experience different stop triggers due to spread and price-side effects, and incurs different swap costs. A live or demo run can therefore provide a more realistic observation than simply flipping historical profit and loss. The tool is a measurement aid, not a profit strategy: mirrored positions hedge the originals, leaving account performance largely exposed to trading costs. It requires a hedging account, skips some order types in inverse mode, and has limits on partial-close handling and stored links.

Key ideas

  • The EA mirrors selected trades inside one hedging account and can reverse trade direction.
  • Paper inversion misses the mirror's own transaction costs and execution effects.
  • Live spread behavior, delayed entry, swap, and order handling can make inverse results differ from the source.
  • The mirror is intended to measure reversal performance; hedged source and mirror trades largely leave costs as the net exposure.
  • Some account types, order types, and partial-close modes are unsupported or limited.

Tags

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