Download Сlose All for MetaTrader 4

Сlose All

Сlose All

This tool for MetaTrader 4 is specifically engineered to streamline your trading operations. This script functions as a utility program designed for specific, one-time execution tasks. It is utilized to perform targeted actions, such as closing all open orders, managing chart objects, or executing custom administrative commands on demand.

MT4 script Pack 📂

How to Setup and Use Сlose All

1. Installation: Move your script file into the MQL/Scripts directory and restart the platform.

2. Execution: Drag the script onto a chart; it will perform a one-time action, such as closing all open orders or clearing chart objects.

3. Editing: Use MetaEditor (F4) to modify code, click "Compile," and verify no errors appear in the terminal before running.

4. Removing: Scripts stop automatically, but you can remove them manually by right-clicking the chart and choosing "Remove Script."

Frequently Asked Questions

Q: How are scripts different from EAs? A: Scripts execute a single action and then stop; EAs monitor the market and trade continuously.

Q: Can I assign a hotkey to a script? A: Yes, right-click the script in the Navigator, select "Set Hotkey," and define your preferred keyboard shortcut.

Q: Why did my script stop? A: Scripts are designed to stop immediately after finishing their programmed command; this is normal behavior.

Description & Settings


A collection of scripts for closing various types of orders.

closeall_comment - closes all orders based on a specific comment

closeall_loss - closes all orders that whose profit/loss goes over a specific loss threshold value

closeall_loss - closes all orders that whose profit/loss goes over a specific profit threshold value

closeall_magic - closes all orders by order magic number

closeall_market - closes all market orders

closeall_pending - closes all pendingorders

closeall_complete - contains all the features of the 6 scripts + option for closing for symbol
Ignored Parameters
When a parameter is ignored, the condition involving that parameter would automatically evaluate to true (as if it is not present on the script).
Parameters of string type (order comment and order symbol) are ignored by the script when their value is either NULL or empty string.
Parameters of real type (profit, loss, & magic) are ignored by the script when their value is -1.
Using Exact Match
In order to get an exact match, the parameter exact should be equal to true. When searching for an exact match, the script respects ignored parameters.
When exact=false, however, the script would an close order if at least one criterion is satisfied. This means that the script should not have ignored parameters. Otherwise, all orders would evaluate to true (closing the order).

You May Also Like

RobotFX does not own any of the code provided on this platform. All tools are freely available on the internet; we simply index and re-offer them for download. We are not responsible for any financial losses that may occur. Trading responsibilities rely solely on the traders downloading and using the displayed Expert Advisors, indicators, and scripts. These tools are provided for educational purposes only and may require modification or optimization to align with a trader's specific strategy or needs.
© ROBOTFX - Best MetaTrader Expert Advisors & Indicators