● Camovia Tray™

Close All Orders

Double-click the script — every position and pending order gone in seconds

Type

Type
Scripts · Batch Positions
Platform
MT4 / MT5
Version
2026-10-09 (source snapshot)
Size
MT4 8 KB · MT5 8 KB
Manually verified
2026-10-09

Download

MT4 — 0cf813a7517cee3f1d9db841ae8bbf92631ad2483a2549cb1e561ac5c47f2886

MT5 — 2b4cae67402f3b8e96e96b63f67c517c56b36ea40312a062b5e15ed7ea7c1cf1

Integrity check — Compare SHA-256 before installing (Windows: certutil -hashfile file SHA256). Sources are unmodified; LICENSE and provenance notes are inside each archive. Downloads are static links: no click tracking, no IP logging.

What is this

Close All Orders is a batch-close script for MT4/MT5: one run closes all open positions at market and cancels all pendings, with filters for symbol, direction, and profit/loss. When the market turns, closing manually one by one is slow and error-prone — this turns the emergency exit into a single double-click. It runs once and exits, exactly what scripts are for.

How it works

  1. On run, walks every open position and pending order, closing/cancelling each
  2. Filters supported: symbol-only, long/short-only, winners-only or losers-only
  3. Reports per-order results; failures are logged with reasons

Installation (3-step summary)

Full install guide →
  1. 1. Download

    Grab the zip via the buttons above

  2. 2. Unpack & copy

    Put .ex4/.ex5 and .mq4/.mq5 into the matching MQL4/MQL5 folders

  3. 3. Enable

    Restart or refresh the Navigator, drag it onto a chart, allow automated trading

Usage notes

  • Compile from MQL4/Scripts (or MQL5/Scripts); drop on a chart to execute
  • MT4 and MT5 source names differ (CloseAllOrders.mq4 / CloseAllPositions.mq5) — same functionality
  • Do a demo-account dry run first to confirm the filters behave as expected

⚠ Risk notes

  • Execution is immediate and irreversible — an accidental double-click closes everything; pre-set filters to clear only the intended subset

Download Camovia Tray free — check quotes, manage positions, and hide in one click from your system tray.

Download Free

Frequently asked questions

▸ Does it cancel pendings too?

Yes, both positions and pendings are cleared, controllable separately via inputs.

▸ Can I close only losing trades?

Yes — inputs filter by profit, symbol, and direction.

▸ Why is the MT5 file named differently?

That's the upstream name (CloseAllPositions.mq5); we keep it verbatim.

Related tools

View details
Scripts MT4 / MT5 Apache-2.0

Breakeven

One double-click moves profitable trades' stops to breakeven — the single-shot version

Scripts Batch Positions Verified 2026-10-09 View details →
View details
Scripts MT4 / MT5 Apache-2.0

Set Fixed SL and TP

Attach fixed SL/TP to a batch of naked positions in one run — protection without per-trade edits

Scripts Batch Positions Verified 2026-10-09 View details →
View details
Scripts MT4 / MT5 Apache-2.0

Open All Charts

Spread your watchlist across the terminal in one click — pre-market prep in ten seconds

Scripts Chart Setup Verified 2026-10-09 View details →

Close All Orders is third-party open-source software provided "as is" with no warranty of any kind. Camovia only curates and redistributes the original source code and is not affiliated with the original author or MetaQuotes. This page is educational and is not investment advice — trade at your own risk.

Found an issue? Broken link, outdated info, or wrong content — feedback is welcome. Email report