EA-38269 · Utility

Close All MT5

A utility Expert Advisor for MT5 that closes all open positions and/or pending orders on the account. It provides a quick one-click or automatic mechanism to liquidate all trades, typically used as an emergency exit or end-of-day cleanup tool.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryUtility
RiskSafe
Rating★★☆☆☆
TypeUtility tool
TimeframesM1, M5, M15, M30, H1, H4, D1
IndicatorsNone
AuthorForex Bonnitta

Backtest results (H1, about 1 year)

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

Strategy analysis

This EA is not a trading strategy but an account management utility. Its core function iterates through all open positions and pending orders on the account, closing or deleting them one by one. Entry conditions are not applicable since this tool does not initiate trades. Exit conditions are triggered by user action or preset automatic conditions such as reaching a specific profit or loss threshold. In terms of position management, the tool does not build positions but only handles bulk liquidation of existing ones. For money management, some variants provide automatic close-all functionality based on profit targets or drawdown limits, serving as a capital protection mechanism. Overall, this is a risk controlauxiliary tool that helps traders quickly exit the market during emergency market conditions or when account profit/loss targets are reached.

Strengths

  • One-click close-all provides rapid capital protection during extreme market conditions
  • Automatic trigger by profit/loss targets enables hands-off money management
  • Magic number filtering allows selective closing of specific EA positions without affecting other strategies
  • Simple and intuitive operation suitable for beginners and scenarios requiring quick reaction

Weaknesses

  • Close-all operation is irreversible; accidental triggering can cause unnecessary position closures and losses
  • Batch closing in low-liquidity markets may incur significant slippage costs
  • Lacks flexibility for partial or staggered closing, unable to finely control exit pacing
  • Frequent market-order close-all may be flagged as unusual trading activity by brokers

Possible improvements

  • Add confirmation dialog or dual-trigger mechanism to prevent accidental close-all execution
  • Implement staggered closing functionality, sorting by position size or P&L to reduce slippage impact
  • Add sound alerts and push notifications to promptly inform traders when auto close-all is triggered

Risk assessment

Overall risk: Safe

  • Accidental close-all execution may close positions unnecessarily
  • Auto close-all during extreme volatility may result in actual loss exceeding the preset threshold due to slippage

Evaluation scores

Code quality3.0
Strategy logic2.0
Risk management4.0
Robustness3.0
Innovation1.0
Documentation2.0
Overall2.5

Parameters

ParameterDefaultDescription
Close Profit OnlyfalseClose profitable positions only
Close Loss OnlyfalseClose losing positions only
Target Profit0Auto close all at target profit (currency units)
Target Loss0Auto close all at target loss (currency units)
Close Pending OrderstrueDelete all pending orders simultaneously
Magic Number-1EA magic number filter, -1 for all
Slippage3Maximum allowed slippage in points

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.