Close all trades on MT5 in one click (free)

A small, free MetaTrader 5 script with one job: run it once and it closes your open positions — on every symbol or only the chart symbol — and can delete your pending orders too. Then it stops. It never opens a trade.

Download Spectar Close All (.ex5, v1.00) Free. No sign-up, no email, no licence key. MetaTrader 5 for Windows only. No DLLs and no web requests.

What it does

How to install

  1. In MetaTrader 5 open File → Open Data Folder, then the folder MQL5\Scripts, and copy SpectarCloseAll.ex5 into it.
  2. In the Navigator panel right-click Scripts → Refresh.
  3. Drag SpectarCloseAll onto any chart and check the inputs. Make sure Algo Trading is switched on in the toolbar.
  4. Click OK, then confirm with Yes in the pop-up. The result appears in the Experts tab.

What it does not do

Questions

Does it work on hedging, netting and FIFO accounts?

Yes. On hedging accounts every position is closed separately; on netting accounts there is one position per symbol. Positions are always closed oldest first, so accounts with a FIFO rule are respected.

Can it close only one symbol?

Yes. Set OnlyThisSymbol to true and it closes only positions (and, if DeletePending is on, pending orders) on the symbol of the chart you drop it on.

What happens if a close is rejected?

On a requote or a price change it tries again, up to 3 times per position. Anything it could not close is counted and shown in the Experts log, and a pop-up tells you to check it.

Want everything closed automatically at your daily limit?

Get the free Daily Loss Limiter

Or work out your daily room first with the free daily loss calculator.

Trading involves high risk of loss. Service only - no signals, no advice.

↑