EA-42180 · Utility

XP Trade Manager

XP Trade Manager is a trade management utility EA that does not open trades itself. It automatically applies Stop Loss, Take Profit, Break Even, and Trailing Stop management to existing positions and pending orders, with an optional Stealth Mode that hides SL/TP levels from the broker using chart objects instead of server-side orders.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryUtility
RiskMedium
Rating★★☆☆☆
TypeUtility tool
TimeframesM1, M5, M15, M30, H1, H4, D1
IndicatorsNone
AuthorCopyright MQL BLUE

Backtest results (H1, about 1 year)

Not backtested yet — this EA could not be converted automatically.

Strategy analysis

This EA is not a strategy-based trading program but rather a position management utility. It does not open trades based on any technical indicators or signals; it only manages existing positions and pending orders. For entry conditions, it entirely relies on the user or other EAs to open positions manually before this EA intervenes. Exit management includes three core functions: first, automatically setting Stop Loss and Take Profit levels calculated from user-input pip parameters; second, a Break Even feature that moves the stop loss to the entry price plus BELevel pips when floating profit reaches BEActivation pips; third, a Trailing Stop feature that dynamically trails the stop loss by TSStep increments at TSDistance distance once price moves favorably beyond TSStart pips. For position sizing, this EA does not involve any lot-increasing or lot-decreasing logic—it only modifies the SL/TP of existing positions. For money management, there is no dynamic position sizing based on account balance or risk ratio. In Stealth Mode, SL/TP information is stored in chart objects rather than sent to the server, preventing the broker from seeing these levels, but this requires the EA to run continuously for SL/TP execution to work.

Strengths

  • Comprehensive functionality integrating SL/TP, Break Even, and Trailing Stop management in a single EA
  • Clever Stealth Mode design that stores SL/TP levels as chart objects, hiding trading intentions from the broker
  • Manages both open positions and pending orders, providing complete coverage of trade management
  • Handles symbol digit differences (3/5 decimal places) by auto-adjusting point values for better compatibility
  • Respects broker stop level restrictions (SYMBOL_TRADE_STOPS_LEVEL), preventing invalid modification requests

Weaknesses

  • In Stealth Mode, the EA must run continuously—if it stops unexpectedly, SL/TP will not execute, creating significant risk
  • Severe code duplication with buy and sell SL/TP management logic nearly copy-pasted, violating DRY principle
  • Incomplete error handling for PositionModify and OrderModify failures—only logs errors without retry logic
  • OnTick iterates all positions on every tick, potentially causing unnecessary performance overhead during high-frequency quotes
  • Order loop uses (ticket-1)>0 check which is flawed—when ticket is 0, subtracting 1 from ulong overflows to max value and still passes
  • No new bar detection mechanism, potentially causing redundant SL/TP modifications within the same bar

Possible improvements

  • Extract buy and sell SL/TP, Break Even, and Trailing Stop logic into common functions to eliminate extensive code duplication
  • Add new bar detection mechanism to avoid redundant modification operations within the same bar, improving performance and correctness
  • Fix the (ticket-1)>0 check in the order loop to ticket>0, preventing ulong overflow logic errors
  • Add retry mechanism and more robust error handling for PositionModify/OrderModify calls
  • Add heartbeat detection and warning mechanism in Stealth Mode to alert users when the EA may be interrupted

Risk assessment

Overall risk: Medium

  • In Stealth Mode, if the EA stops running, SL/TP becomes completely ineffective, leaving positions unprotected
  • The ulong overflow bug in the order loop could cause operations on invalid tickets
  • Lack of new bar detection may cause frequent SL modifications to be rejected or produce slippage during volatile markets

Evaluation scores

Code quality2.0
Strategy logic3.0
Risk management3.0
Robustness2.0
Innovation3.0
Documentation1.0
Overall2.3

Parameters

ParameterDefaultDescription
StopLoss20Stop loss in points, SL distance per order
TakeProfit40Take profit in points per level
UseBreakEventrueEnable break-even function
BEActivation50Break-even activation points (triggered at this floating profit)
BELevel10Break-even SL distance from open price in points
UseTrailingStoptrueEnable trailing stop
TSStart10Trailing stop start points
TSStep10Trailing stop step in points
TSDistance15Trailing stop distance from price in points
TSEndBEfalseTrailing stop capped at break-even level
StealthModefalseStealth mode, SL/TP not sent to server
OnlyCurrentPairInittrueManage positions for current symbol only

Similar Utility EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.