MetaTrader 5 Help

Files and Folders

Files and Folders

This section contains the description of how the platform's files and folders are stored. In the main mode of platform start, modifiable and read-only files of the platform are stored separately.

Read-only Files of the Platform

These files are located in /Program Files/platform folder/. They are:

  • Terminal.exe — the executable file of the trading platform;
  • MetaEditor.exe — the executable file of the built-in MQL5 language editor;
  • Sounds/*.wav — a set of standard audio files of the trading platform;

Modifiable Files

The main platform directory contains several folders: Bases, Config, Logs, MQL5, Profiles, Templates, Tester. For quick access to the desired storage location, use command "Open data folder Open data folder" in the File menu.

All text files are of Unicode format. Use appropriate software to edit them.

The Bases directory contains the platform's data bases grouped by servers, as well as some settings:

Folders and Files

Description

Sub-folders

Description

Default

Default folder of the platform database

History

The folder stores history data of financial instruments. Each security is stored in a separate directory that contains files yyyy.hcc, ticks.dat and the cache folder. Files yyyy.hcc contain one-minute data of a symbol, the file name reflects the year to which the data belong. The file ticks.dat contains tick data of a symbol. Files *.hc stored in the "Cache" folder contain bars of different timeframes calculated for a symbol from one-minute data. They are automatically created when you select the appropriate chart period.

Mail

The folder stores all emails received or sent from the platform. Mail databases are stored in *.dat files; a separate file is created for each account opened in the platform. For example, mail-xxxxx.dat, where xxxxx is the account number.

 

Server 1 — N

Platform database folders for different trade servers

News

The folder only stores one file news.dat containing the database of all newsletters ever received in the platform from a selected trade server.

Symbols

File selected-xxxxx.dat contains the database of symbol currently selected in the Market Watch window. File symbols-xxxxx.dat contains the common database of symbols available on this trade server.

Trades

Contains subfolders named by account numbers ever opened in the platform. Each account folder contains files deals_yyyy.mm.dat and history_yyyy.mm.dat with the information about trade and order history respectively. Separate files are created for each month. Here yyyy means the year, and mm — month.

alerts.dat

Contains the database of created alerts.

books.dat

Contains a list of currently open windows of request queues.

favourites.dat

Contains a database of elements added to Favorites of the Navigator window.

hotkeys.ini

Contains a database of keyboard shortcuts.

indicators.dat

Contains usage statistics of indicators to display in the Insert menu.

objects.dat

Contains usage statistics of objects to display in the Insert menu.

Directory Config contains platform configuration files:

Folders and Files

Description

certificates

Folder containing certificate files *.pfx

accounts.dat

Contains a database of accounts and their settings.

common.ini

Contains common platform settings available in the Options window opened through the Tools menu.

metaeditor.ini

Contains common settings of MetaEditor.

mt5terminal.ini

Contains platform interface settings and last used values (for window positioning, attached indicators, etc.)

servers.dat

Trade server settings for connection.

The Logs directory contains log files of the platform and MetaEditor, as well as crash logs:

Folders and Files

Description

/Crash/crash.log.*

Directory /crash contains files of the platform crashes. These files are automatically sent to the developer company to determine and eliminate their causes.

yyyymmdd.log

Log files containing information about events occurring in the platform. Platform logs are stored in separate files for each day it runs. Here yyyy stands for the year, mm — month, dd — date.

metaeditor.log

MetaEditor log files.

The MQL5 directory contains all the information related to programs written in this language:

Folders and Files

Description

/Experts

Contains Expert Advisor, compiled files (*.ex5) and source code files (*.mq5).

/Files

Contains files used by Expert Advisors and scripts.

/Images

Contains image files in *.bmp format.

/Include

Contains common *.mqh include files.

/Indicators

Contains files custom indicators.Con

/Libraries

Contains MQL5 libraries.

/Logs

Contains Expert Advisor log files (yyyymmdd.log). These files are created separately for each day of the EA operation, their names correspond to their creation date: yyyy stands for the year, mm month, dd date.

/Presets

Parameters of Expert Advisors start are stored in this folder ("Input Parameters").

/Scripts

Contains files of scripts.

experts.dat

Contains usage statistics of MQL5 programs to display in the Insert menu.

The Profiles directory contains various profiles and templates:

Folders and Files

Description

Sub-folders

Description

/Charts

This folder contains chart profiles.

Default

Templates of default chart settings are stored in this folder.

Profile

Custom chart profiles are stored in this folder. Files *.chr contain chart descriptions, order.wnd — the order of chart windows.

/Deleted

This folder contains templates of deleted charts allowing to reopen them later.

/Symbolsets

This folder contains sets of symbols (including displayed information columns) for the Market Watch window.

/Templates

This folder contains chart templates as *.tpl files.

gvariables.dat

This file contains information about global variables used in the platform.

The Templates directory contains report templates and chart templates:

Files

Description

ReportTrade.htm

Current positions and orders report template.

ReportHistory.htm

Trading history report template.

ReportTester.htm

Testing report template.

The Tester directory contains files and folders used by the Strategy Tester:

Folders and Files

Description

Sub-folders

Description

Agent-IP-address-port

These folders are created for each agent of the tester. The folder name contains the IP address and port number the agent runs on.

MQL5

The file of the Expert Advisor that was tested last is stored in this folder. Expert Advisors are not saved in the folders of remote agents.

logs

The entries of the agent operation journal are stored in this folder.

bases

History data used by the agent are stored in this folder.

logs

This folder contains Strategy Tester log files (yyyymmdd.log). These files are created separately for each day of the EA operation, their names correspond to their creation date: yyyy year, mm month, dd date.

/Manager

This directory contains log entries of the MetaTester component.

/Cache

This folder contains the XML-file of cache of last Expert Advisor optimization.

*.set

The root directory stores files with the last used sets of input parameters for each Expert Advisor that has ever been tested.