Version: 20.103
Updated: 14.10.2020
Added: 14.06.2018
License: Free
Script for closing and deleting orders in the MetaTrader terminal. It is designed to facilitate the trader's routine work, as well as to close and delete all orders in the terminal as quickly as possible.
Version: 21.042
Updated: 07.04.2021
Added: 25.08.2014
License: Free
The script uploads the trading history according to the specified settings. In the uploaded file, the trader can see hidden fees and real prices for executing trading orders. It is designed to create reports in csv format for a more in-depth analysis of the trading history in Excel, Openoffice and Libreoffice.
Version: 21.030
Updated: 16.03.2021
Added: 12.10.2014
License: Free
Simple script to remove all unnecessary data from the charts in the MetaTrader terminal, just drag the script to the chart and within a few seconds the script will complete its work and clear the chart completely.


A MetaTrader script is a specialized small program designed to perform one or several specific actions within the MetaTrader trading terminal, after which it automatically deletes itself from the chart. Essentially, scripts are a convenient tool for automating one-time operations, significantly simplifying the trader’s work and saving time by eliminating the need for manual repetitive actions.
Unlike Expert Advisors (EAs), which run continuously and implement automated trading strategies, scripts are intended for a single launch to perform a specific task. EAs continuously analyze the market, opening and closing trades according to a set algorithm, whereas a script is manually launched by the trader once, executes the assigned operation, then stops functioning and removes itself from the chart window. This mechanism keeps the terminal clean and prevents unnecessary process overload.
Nevertheless, there are so-called looped scripts which can run continuously until manually removed by the trader. This extends the functionality of standard scripts, allowing some processes to be automated over a longer timeframe without fully switching to Expert Advisors.
Scripts are widely used for various tasks: from opening or closing positions and orders to complex analytical operations. Here are some main types and applications of scripts in MetaTrader:
Scripts in MetaTrader are written in the programming languages MQL4 or MQL5, specially developed for creating trading advisors, indicators, and utilities within the MetaTrader terminal. Creating your own script starts by opening the integrated MetaEditor where you can set the main parameters, write the functionality, and compile the program.
A fundamental feature of scripts is that initialization (init), processing (start), and deinitialization (deinit) functions are each called only once when the script starts and finishes. The script is launched either by double-clicking or by dragging it onto the chart window. After completing its assigned task once, the script automatically removes itself from the chart, freeing terminal resources.
Traders are advised to use scripts as auxiliary tools to simplify and speed up the trading process. Using scripts alongside Expert Advisors and indicators allows creating a flexible and effective trading system that maintains control and automation.
It is important to remember that running too many scripts simultaneously can slow down the terminal, so careful selection and optimization of utilities is critical. Scripts should also be tested on demo accounts to avoid errors and unexpected behavior in live trading.
Thus, MetaTrader scripts are a powerful and flexible tool that helps traders automate daily tasks, improve execution speed and quality of trading operations, and make the trading process more convenient and manageable. Thanks to their simplicity and versatility, scripts occupy an important place in the arsenal of a modern trader.


Yes, of course. MetaTrader scripts work according to their embedded algorithms, which makes them universal tools for trading on various financial markets, including Forex.
The distinctive feature of scripts is that the type of financial instruments or markets you trade on does not matter to them. This means that regardless of whether you trade currency pairs, stocks, indices, or commodities, the scripts will perform their tasks correctly if they are properly written and intended for the required operations.
The MetaTrader trading platform supports multiple asset classes. Scripts written in MQL4 and MQL5 call terminal functions that abstract the specifics of particular financial instruments. This makes it possible to create programs capable of performing trading and analytical tasks on a universal basis.
For example, a script designed to open a trade with a specified volume or to manage a stop-loss will function equally well with a currency pair like EUR/USD or CFDs on oil or indices. The main point is that asset characteristics and broker restrictions are accounted for in the algorithm.
To use scripts in Forex trading, you need to:
Scripts folder.Despite their universality, when using scripts you should consider the following:
Thus, MetaTrader scripts are powerful and universal tools that can be effectively used for trading on the Forex market. They execute the embedded algorithms and are independent of the instrument type or market specifics. By using scripts, traders can significantly simplify their trading, speed up operation execution, and improve accuracy and discipline.
It is important to remember the need to adapt and test each script according to your tasks and trading conditions. This ensures reliability and efficiency in practical application.


MetaTrader scripts are designed for use in the two widely popular trading platforms developed by MetaQuotes — MetaTrader 4 and MetaTrader 5. Both platforms are powerful tools that provide traders with extensive capabilities for technical analysis and trade automation.
MetaTrader 4 (MT4) is the classic and most popular version of the trading platform, launched in 2005. Its main advantages are simplicity, stability, and a large number of available Expert Advisors, indicators, and scripts. MT4 supports Forex and CFD trading.
MetaTrader 5 (MT5) is a newer platform launched in 2010, extending MT4’s capabilities and designed for trading a wider range of markets including stocks, futures, indices, commodities, and cryptocurrencies. MT5 features enhanced technical analysis tools, multithreading, and 64-bit support.
Despite similarities, there is no full backward compatibility between MT4 and MT5. Scripts written for MT4 in MQL4 cannot be directly used in MT5, which uses MQL5. The main differences lie in the platforms’ architecture and trading execution models.
However, the developer community has created libraries and tools to help port scripts from MQL4 to MQL5, allowing many programs to be adapted to the new platform, although this requires programming knowledge and testing.
When selecting or downloading scripts, make sure they are compatible with your platform. MT4 users should look for .mq4 scripts; MT5 users for .mq5.
Also, many developers release separate versions of their scripts for MT4 and MT5. When installing, ensure files are placed correctly: MT4 scripts into the Scripts folder under MQL4, MT5 scripts under MQL5.
Scripts for both platforms are available on the official MQL5.com website, as well as on various third-party sites and trader communities. Many brokers also provide their own sets of scripts and utilities tailored to their trading conditions and platforms.
Key points on this topic:
Using the appropriate scripts for your chosen MetaTrader platform ensures stable and effective automation of trading processes, allowing traders to focus on strategy and analysis rather than platform technicalities.
Even more in the Telegram community
Send us a message
Comments