● Camovia Tray™

CloseWinner (Batch Close-Profits Script)

Close every profitable position in one click — minimal, but honest and reliable

Type

Type
Scripts · Batch Positions
Platform
MT5
Version
2026-10-08 (source snapshot)
Size
MT5 13 KB
Manually verified
2026-10-08

Download

MT5 — c1c84fe728186206cf4cf62dfc81131151ced7e7bc165bf757762820e3fcd874

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

A tiny MT5 script in a few dozen lines: run it once, it walks all open positions and market-closes the ones in profit, leaving losers untouched. No panel, no parameter soup — the code reads in a minute. The upstream repo ships no docs; this page was written by Camovia from the source. Distributed under GPL-3.0.

How it works

  1. Iterates over all open positions
  2. Sends a market-close request for every position with positive floating P&L
  3. Exits when done — nothing stays resident

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

  • MT5 only; dragging it onto a chart executes immediately with no confirmation dialog
  • Useful for manual traders locking in profits quickly at key moments

⚠ Risk notes

  • Execution closes instantly with no second confirmation — check for profitable hedge legs you want to keep
  • The minimal implementation has no retry logic for partial failures; you may need to finish manually in fast markets

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

Download Free

Frequently asked questions

▸ Why is the code so short?

It does one thing: close winners. The minimalism is the value — transparent logic, no hidden behavior.

▸ Does it close losing positions too?

No, only floating-profit positions; use the platform's built-in tools to close everything.

▸ Is 2018-era code still fine?

It uses stable MQL5 APIs and compiles on current MT5 builds; report any compiler warnings to us.

Related tools

Related articles

CloseWinner (Batch Close-Profits Script) 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