Upgrade to MetaTrader 4 Build 600 and Higher
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
- Data Copied During the Upgrade
- What Is the Data Folder
- What Is the Installation Folder
- General Mode of Terminal Start
- Portable Mode
- How to run old EX4
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.
Start the terminal and connect to any trading server where the new version is available, for example demo.metaquotes.net. 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.
User programs from the \experts folder are copied as follows:
Source folder in the installation directory |
Content | Destination folder in the terminal data directory |
---|---|---|
\experts | 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. | <data_folder>\MQL4\Experts |
\experts\indicators | Custom indicators | <data_folder>\MQL4\Indicators |
\experts\scripts | Scripts (MQL4 applications for a single run on the chart) | <data_folder>\MQL4\Scripts |
\experts\include | Include MQH and MQ4 files | <data_folder>\MQL4\Include |
\experts\libraries | MQ4 source code libraries and EX4 compiled files | <data_folder>\MQL4\Libraries |
\experts\files | Special "file sandbox". MQL4 applications are allowed to execute file operations only within this directory. | <data_folder>\MQL4\Files |
\experts\logs | Log files of MQL4 applications | <data_folder>\MQL4\Logs |
\experts\presets | Set- configuration files for MQL4 applications | <data_folder>\MQL4\Presets |
\experts\images | Image files | <data_folder>\MQL4\Images |
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).
where:
- С: 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 |
Requirements |
---|---|---|
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 XP | The 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 directory | Windows Vista\Windows 7 | Permission to write to the installation folder |
External hard drive, usb flash drive, etc. | Windows Vista\Windows 7 | The 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 directory | Windows 8 and higher | Permission to write to the installation folder |
External hard drive, usb flash drive, etc. | Windows 8 and higher | The 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.
Translated from Russian by MetaQuotes Ltd.
Original article: https://www.mql5.com/ru/articles/1389
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use