EA-62811 · Utility

Close all orders

A utility EA that provides a GUI button to close all open market positions and/or delete all pending orders with a single click. It features a confirmation dialog, real-time order count display, and configurable slippage tolerance. The EA does not open any trades itself; it solely manages existing orders.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryUtility
RiskSafe
Rating★★★☆☆
TypeUtility tool
TimeframesM1, M5, M15, M30, H1, H4, D1
Indicators—
AuthorCopyright 2024

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 EA but rather an order management utility, so it has no traditional entry or exit strategy concept. Its core function is batch closing of positions and batch deletion of pending orders, triggered by user clicking a chart button. For position management, the EA iterates through all positions and pending orders in reverse order to avoid index shifting during deletion. Money management is not applicable since the EA does not open positions or calculate lot sizes. The slippage parameter allows users to control price deviation tolerance when closing positions. The confirmation dialog adds operational safety by preventing accidental closures from misclicks.

Strengths

  • One-click close all feature is convenient for scenarios requiring rapid liquidation
  • Confirmation dialog prevents accidental operations, improving operational safety
  • Reverse iteration over orders avoids index shifting issues, logic is correct
  • Real-time display of market and pending order counts provides intuitive information
  • Separate controls for closing market orders vs pending orders offers good flexibility

Weaknesses

  • No filtering capability — cannot selectively close by symbol, magic number, or direction
  • No retry mechanism — failed closures are skipped without reattempting
  • UpdateInfoDisplay and ChartRedraw called every tick may impact chart performance
  • No filling mode (FILLING) specified, which some brokers may require
  • INFO button functionality is simple, only displaying settings with limited practical use

Possible improvements

  • Add filtering by symbol, magic number, and direction for selective closing capability
  • Implement a retry mechanism for failed closures to improve success rate during unstable network conditions
  • Optimize info update frequency by using a timer instead of per-tick refresh to reduce performance overhead

Risk assessment

Overall risk: Safe

  • Per-tick chart refresh may impact performance in high-frequency environments
  • Missing filling mode specification may cause closure failures on some broker platforms

Evaluation scores

Code quality4.0
Strategy logic3.0
Risk management4.0
Robustness3.0
Innovation2.0
Documentation2.0
Overall3.0

Parameters

ParameterDefaultDescription
ButtonX20Button X coordinate position
ButtonY50Button Y coordinate position
ButtonWidth180Button width
ButtonHeight40Button height
ButtonColorclrCrimsonButton background color
TextColorclrWhiteButton text color
CloseMarketOrderstrueClose market orders
ClosePendingOrderstrueDelete pending orders
Slippage10allowedslippage (points)
ShowConfirmationtrueShow confirmation dialog

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.