Skip to content
All library documents

Moving Multiple Trades to Breakeven After Favorable Price Movement

Article MQL5 code base

Summary

The document describes a MetaTrader utility for moving several open positions to breakeven once price has moved favorably. It offers two trigger approaches: a points-based move, with a stated default of 100 points for a five-digit broker, or a target-price method. The tool is intended to protect the initial investment while leaving the trade open to reach a profit target or close around its entry level.

The two trigger settings are alternatives: selecting the points method makes the target-price setting inactive, and choosing target price makes the points setting inactive. An update is said to address execution issues across brokers, provide more detailed error descriptions, and add filtering by trade magic number. The document does not explain how breakeven is calculated after commissions, swaps, or slippage, and it provides no tests or performance evidence. Moving stops to entry can limit some losses, but does not guarantee a zero-cost exit.

Key ideas

  • The utility can adjust multiple open positions to breakeven after favorable movement.
  • Users can set the trigger by a points distance or a target price.
  • Only one of the two trigger methods is active at a time.
  • The described update adds magic-number filtering and broker-related error handling.
  • The document gives no evidence about performance or treatment of trading costs.

Tags

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