Download MetaTrader 5

Upgrade to MetaTrader 4 Build 600 and Higher

5 March 2014, 11:25
MetaQuotes Software Corp.
12 198

On February 3, 2014 we released the new MetaTrader 4 build 600 with the completely revised MQL4 language and access to the Market of applications.

In addition to the updated MQL4 language for programming trading strategies, the new version of the MetaTrader 4 terminal provides a revised structore of user data storage. In earlier versions all programs, templates, profiles etc. were stored directly in the terminal installation folder. Now all necessary data required for a particular user are stored in a separate directory called data folder. However, some traders who have never worked with the latest versions of Windows may have question about the operation of the new terminal.

Upgrade to New MetaTrader 4

Here is an example of how to upgrade MetaTrader 4 build 509 to build 610. Suppose MetaTrader 4 build 509 is installed in Program Files system folder.

Before you start the update process, it is recommended that you make a backup copy of your current MetaTrader 4 terminal. You may use it later, in case you need transfer your files to another computer or to a new copy of the terminal.

Start the terminal and connect to any trading server where the new version is available, for example MetaTrader 4 will automatically start to download the update, during which numbers in the lower right corner will change to show the progress.

After the download is complete, "LiveUpdate: finished" appears in the "Terminal" window tab "Journal".

To complete the update restart the terminal manually. Close the terminal and run it again.

The new version of the terminal is easily distinguished from the previous one: MetaEditor icon has changed and a new tab "Market" with trading robots and indicators is now available.

If you have custom MQL4-programs, the following dialog box will appear after upgrade to the new version. It shows brief information about changes in the file structure of the terminal. All the details of the update are available in the terminal log.

Data Copied During the Upgrade

During the update, folders \config, \experts, \history, \logs, \profiles, \templates and \tester are transferred from the installation directory to the data folder.

Only standard folders and files are copied. Other ones are not copied even if they are located in folders \config, \experts, \history, \logs, \profiles, \templates, \tester.

User programs from the \experts folder are copied as follows:

Source folder in the installation directory
Content Destination folder in the terminal data directory
Expert Advisors (trading robots)
Note: only files from the root directory \experts are transfered. No subdirectories are transferred, because it is impossible to reliably determine their contents.
\experts\indicatorsCustom indicators
Scripts (MQL4 applications for a single run on the chart)<data_folder>\MQL4\Scripts
\experts\includeInclude MQH and MQ4 files<data_folder>\MQL4\Include
\experts\librariesMQ4 source code libraries and EX4 compiled files
\experts\filesSpecial "file sandbox". MQL4 applications are allowed to execute file operations only within this directory.<data_folder>\MQL4\Files
Log files of MQL4 applications
Set- configuration files for MQL4 applications
Image files

Please note that user programs are copied, but not migrated. After copying these MQ4/MQH/EX4 files are not deleted.

Programs from the previous standard terminal delivery pack are not copied during upgrade. Instead, new standard delivery programs are installed in the data folder.

You cab see the details of file migration process in the Journal of the MetaTrader 4 terminal.

These logs are also available in the *.log file of the Journal.

For more details please read the article Data Structure in MetaTrader 4 Build 600 and Higher.

What Is the Data Folder

The Data Folder is a special directory for storing files containing user data that change during operation of the MetaTrader 4 terminal build 600 and higher. For example, chart templates, profiles, set-files that contain input parameters of applications, source code and compiled EX4 files.

To go to the data folder from the terminal, open the "File" menu and click "Open Data Folder".

The root of each data folder contains the origin.txt file. This file shows the path to the installation directory of the terminal to which it relates.

What Is the Installation Folder

Terminal installation folder is the place on your computer that you have specified during terminal installation, or where you have placed the entire copy of the installed terminal. The installation folder contains files that will not change during operation, for example executable files terminal.exe and metaeditor.exe.

You can also see where the terminal installation folder is located in the properties of the desktop shortcut of the program via the context menu.

A click on "Open file location" in the context menu will open the installation folder.

General Mode of Terminal Start

In most cases, on computers running Windows Vista and higher, after upgrading from 509 to build 600 and higher, the data folder of the terminal will be located separately from the installation folder. The data directory is located in a separate folder in a special user folder if at least one of the following conditions are met:

  • User Account Control or UAC is enabled in Windows (starting with Windows Vista).
  • The user who runs the terminal has limited rights to write terminal data to the installation folder.
  • The user who runs the terminal works over a network connection (RDP).
The data folder will be located on the system drive in the following path:


  • С: is the name of a system disk;
  • User_account_name is the user's account for working in Windows;
  • Instance_id is the unique name of the folder where all the user's data for working with a certain copy of MetaTrader 4 terminal is stored. The unique name consists of 16 characters. The name is generated based on the path to the terminal installation folder, because the path to the terminal installation directory cannot be used explicitly as a folder name. A long unique name is used, because multiple copies of the terminal can be installed on one computer.

If the specified conditions are not met when you run the terminal, the data folder will be located in the installation folder.

Portable Mode

The Portable mode is active when you use the "/portable" key. This mode is used for running the terminal on portable data medium, in non-system directories, as well as on computers running Windows XP. For more convenience, you can create a separate terminal launch shortcut and write "/portable" in its properties.

When launched in the Portable mode, the terminal tries to save its data in the installation folder. However, using Portable mode does not guarantee that an operating system will allow storing data in the installation folder (for example, if the terminal is installed in Program Files directory and UAC is enabled).

The following conditions should be met for working in the Portable mode:

Installation directory
Operating System
Program Files or another system directory (for example, Windows)
Windows XP
Permission to write to the installation folder
Another non-system directory
Windows XP
Permission to write to the installation folder
External hard drive, usb flash drive, etc.Windows XPThe terminal will always be launched in Portable mode
Program Files or another system directory (for example, Windows)Windows Vista\Windows 7
Launching the terminal as administrator and disabled UAC
Another non-system directoryWindows Vista\Windows 7
Permission to write to the installation folder
External hard drive, usb flash drive, etc.Windows Vista\Windows 7The terminal will always be launched in Portable mode
Program Files or another system directory (for example, Windows)
Windows 8 and higher
It is impossible to use Portable mode, as UAC system cannot be disabled
Another non-system directoryWindows 8 and higher
Permission to write to the installation folder
External hard drive, usb flash drive, etc.Windows 8 and higherThe terminal will always be launched in Portable mode

How to run old EX4

In the previous version of the terminal, all user MQ4, MQH and EX4 files were stored in the \experts root folder. In the new MetaTrader 4 terminal version the root of the file structure for storing programs is \MQL4 in the data folder. During automatic copying user programs are transfered according to their type.

If an indicator or Expert Advisor does not appear in the terminal Navigator after the update, it means that the program is in a nonstandard location. Such programs should be copied manually into the appropriate subfolder in <data_folder>\MQL4.

Recompilation of old program files is not required. MQL4 application created in build 509 or older will run correctly in the new terminal version.

During the upgrade process files are copied to the new location, but old EX4 files are note recompiled. You should decide yourself whether to recompile your MQL4 applications.
We recommend that you read additional information at the following links:

Translated from Russian by MetaQuotes Software Corp.
Original article:

Last comments | Go to discussion (1)
munwar shaikh
munwar shaikh | 30 Jun 2014 at 22:46
ms_trader_ buy sell
Step on New Rails: Custom Indicators in MQL5 Step on New Rails: Custom Indicators in MQL5

I will not list all of the new possibilities and features of the new terminal and language. They are numerous, and some novelties are worth the discussion in a separate article. Also there is no code here, written with object-oriented programming, it is a too serous topic to be simply mentioned in a context as additional advantages for developers. In this article we will consider the indicators, their structure, drawing, types and their programming details, as compared to MQL4. I hope that this article will be useful both for beginners and experienced developers, maybe some of them will find something new.

Here Comes the New MetaTrader 5 and MQL5 Here Comes the New MetaTrader 5 and MQL5

This is just a brief review of MetaTrader 5. I can't describe all the system's new features for such a short time period - the testing started on 2009.09.09. This is a symbolical date, and I am sure it will be a lucky number. A few days have passed since I got the beta version of the MetaTrader 5 terminal and MQL5. I haven't managed to try all its features, but I am already impressed.

Using text files for storing input parameters of Expert Advisors, indicators and scripts Using text files for storing input parameters of Expert Advisors, indicators and scripts

The article describes the application of text files for storing dynamic objects, arrays and other variables used as properties of Expert Advisors, indicators and scripts. The files serve as a convenient addition to the functionality of standard tools offered by MQL languages.

How to create an indicator of non-standard charts for MetaTrader Market How to create an indicator of non-standard charts for MetaTrader Market

Through offline charts, programming in MQL4, and reasonable willingness, you can get a variety of chart types: "Point & Figure", "Renko", "Kagi", "Range bars", equivolume charts, etc. In this article, we will show how this can be achieved without using DLL, and therefore such "two-for-one" indicators can be published and purchased from the Market.