SWDM Position Manager EA (Source code)

A local MetaTrader 5 position management Expert Advisor that protects and manages already open trades with internal stop logic, risk/reward targets, partial closes, break-even protection, trailing logic, Fast Trade protection modes, and overtrading control. It does not generate entry signals and does not place broker-side SL/TP by default.

Description

The SWDM Position Manager EA v1.00 is designed for traders who open positions manually or with other tools and want those positions managed automatically inside MetaTrader 5. The EA monitors matching open positions on the chart symbol and applies internal risk management without setting visible server-side stop loss or take profit levels. In its default RR mode, it calculates an internal stop, tracks the configured risk/reward target, can partially close a position at target, moves the remaining position into break-even protection, and then manages the runner with step-based trailing logic.

The EA also includes Fast Trade Mode for short-term trade handling. Fast Trade Mode 1 manages 0.01 lot positions with internal money-lock protection and a configurable loss close limit. Fast Trade Mode 2 manages positions from 0.02 lot and above with M5 entry-candle confirmation, loss protection, internal money lock, and opposite M5 candle exit logic. This makes the EA useful both for structured RR management and for faster manual trading workflows where capital protection must react quickly.

  • MetaTrader 5 Expert Advisor for managing already open positions
  • Default internal RR manager with configurable risk/reward target
  • Internal SL/TP logic without broker-side SL/TP placement
  • Automatic risk-based internal stop calculation using balance or equity
  • Optional shared risk across all managed positions
  • Partial close at RR target with break-even protection for the remaining position
  • Early break-even protection before the full RR target is reached
  • Step-based internal trailing after break-even
  • Post-partial pullback protection for runner positions
  • Fast Trade Mode 1 for 0.01 lot money-lock protection
  • Fast Trade Mode 2 with M5 entry-candle confirmation and loss protection
  • Overtrading protection: extra matching positions above the configured limit are closed
  • Position filters for symbol, manual positions, magic number, empty comments, and empty server SL/TP
  • Protection against duplicate managers on the same account and symbol
  • Interactive chart panel with position accordions, internal stop, TP target, progress, state, and status information

System requirements

  • Windows 10/11
  • MetaTrader 5 desktop terminal
  • A trading account connected to a broker server
  • Algo Trading enabled in MetaTrader 5
  • Permission to run Expert Advisors on the selected chart
  • Market data available for the traded symbol

How to use (quick guide)

  • Copy the EA file into the MetaTrader 5 MQL5/Experts folder.
  • Compile the file in MetaEditor or restart MetaTrader 5 if you use the compiled EX5 version.
  • Attach the EA to the chart symbol you want to manage.
  • Enable Algo Trading in MetaTrader 5.
  • Select Default RR mode or Fast Trade mode in the EA inputs.
  • Open a position manually or with another tool.
  • Monitor the chart panel for managed positions, internal stop, TP target, RR state, partial-close status, and trailing state.

Important: The SWDM Position Manager EA v1.00 is a risk and position management tool. It does not create market entries by itself in the default workflow. Its main purpose is to manage existing positions with internal logic and to protect capital through automatic closing, partial closing, break-even handling, trailing, and overtrading protection.

€49.90