Skip to content
All library documents

A Loss-Only Trade Manager with Rule-Based Early Exits

Article MQL5 code base

Summary

This document describes a trade management tool that monitors existing positions rather than generating entry signals. It can be attached to a chart and configured to watch selected positions, including manual trades or positions opened by another automated system. Symbol and magic-number filters determine which trades are in scope. The tool is designed to close a monitored position while it is floating at a loss when one of five exit rules is triggered. The named rules include adverse movement measured with ATR, time in the trade, EMA-based invalidation, RSI, and a money cap.

Positions in profit are excluded from its closing logic. This makes the tool an overlay for limiting or managing losing trades, not a standalone strategy. The document provides no rule thresholds, configuration guidance, comparative tests, or performance evidence, so it does not show how the exits affect realized losses, missed recoveries, or overall system returns. Results would depend on how the rules are parameterized and on the underlying strategy and market.

Key ideas

  • The tool manages existing positions and does not open trades.
  • Symbol and magic-number filters select which manual or automated positions it monitors.
  • It can close a losing position when an ATR, time, EMA, RSI, or monetary rule is triggered.
  • Positions that are in profit are left alone.
  • The document gives no parameter values or test results for the exit rules.

Tags

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