New Features of MetaTrader 5: Architecture

One of the main features that differs MetaTrader 5 from MetaTrader 4 is its architecture. A set of functions that were previously performed by one server, are logically divided between separate components in the new platform: a trade server, an access servers, a history and backup server. Such an organization of the internal interaction significantly increases the reliability and performance of the system.

What is the architecture of MetaTrader 5, and what are its main features and differences from its predecessor - MetaTrader 4?

The Main Differences from MetaTrader 4

The minimal (basic) server configuration of MetaTrader 4 consists of only one server component - MetaTrader 4 Server. This is the kernel of the entire platform, without which the system cannot function. MetaTrader 4 Server performs all the functions necessary to provide the operation of the MetaTrader 4 trading platform.

The minimal (basic) configuration of the MetaTrader 5 platform differs much from MetaTrader 4, and consists of four server components: Main Trade Server, Backup Server of Main Trade Server, Access Server, History Server. Unlike MetaTrader 4 Server, which alone performs all the main and auxiliary (service) functions, these functions are distributed among four specialized servers. Each of these servers performs only its own strictly defined tasks.

The table below shows the basic functions of the MetaTrader 4 Server and functions of each server of the MetaTrader 5 platform.

MetaTrader 4 Server
MetaTrader 5 Server

MetaTrader 4 Server:

  • servicing client connections;

  • storage and work with the database of accounts;

  • storage and work with the database of orders;

  • control over the execution of all trade operations (execution of incoming trade orders);

  • storage and work with the history database (providing history to clients);

  • work of data feeds (transmitting quotes and news to clients);

  • backup;

  • storage and management of all the other settings of MT4 (managers, groups, symbols, etc.);

  • receipt and distribution of updates (LiveUpdate) for all components of the system.

MetaTrader 5 Access Server:

  • servicing client connections (client, manager and administrator terminals);

  • serving as a proxy server and firewall;

  • providing LiveUpdate to clients;

  • caching history from the History Server and providing it to clients.

MetaTrader 5 Trade Server:

  • storage and maintenance of the database of clients' accounts and trade operations;

  • processing trade requests;

  • authorization of client connections.

MetaTrader 5 Main Trade Server:

  • management of all components and settings of the platform;

  • serving as a trade server.

MetaTrader 5 History Server:

  • receiving news and quotes from data feeds and providing them to other components of the platform;

  • filtering quotes;

  • storing the database of quotes and news.

MetaTrader 5 Backup Server:

  • backup of trade servers;

  • backup of history servers.

МetaТrader 5 Web server:

  • providing opportunity to trade via a web browser.


Let's consider in more detail the internal structure of the MetaTrader 5 online trading complex.

Distributed Architecture

The MetaTrader 5 trading platform is based on a distributed architecture. In a distributed system, data processing and storing are not focused on a single computer, but are distributed among several computers. The choice of such a scheme is not accidental and conditioned by the following general properties of distributed information systems:

  • Performance

    It is ensured by the possibility of redistribution of the load on individual components - the system servers.

  • Scalability

    If you need to physically improve the performance, a distributed system can easily integrated new computing resources into its transporting environment.

  • Extensibility

    New components (server software) with new functions can be added to distributed applications.

  • Controllability

    This property implies the system's ability to effectively control its constituent parts, which is achieved through the use of management software.

  • Fault Tolerance

    Presence of several computers and possibility of duplication of information means that distributed systems are more resistant to hardware and software errors. If one of the components fails, the system is able to keep maintaining the full or partial functionality.

The MetaTrader 5 platform includes the following components:

Attention: The minimal configuration of the MetaTrader 5 trade platform consists of four components: Main Trade Server, Backup Server of Main Trade Server, Access Server, History Server




MetaTrader 5 Main Trade Server

In addition to processing of trade operations, the main server implements the management over the entire system. The administrator of the main trade server can manage the configuration of all servers.

If several trade servers are installed in a system, the main trade server can be used exclusively for the system configuration. In this case, all trade operations will be processed by common trade servers.

The administrator of the main trade server must configure:

  • all servers of the system;

  • client groups;

  • trading symbols;

  • manager accounts;

  • history of prices;

  • data feeds.

Only one main trade server can be present in a system.


MetaTrader 5 Trade Server

Besides the main trade server, the unlimited number of trade servers can be installed. They are designed for processing trade operations, storing and managing all client and trade databases.

The trade server performs the following functions:

  • storing and management of clients' accounts;

  • authentication and authorization of client connections;

  • storing and management of trading records;

  • processing trade requests;

  • internal mail system.

Installation of additional trade servers cans solve the problem of the growing number of clients, and will help to enter markets of other regions and countries. The maximal number of trade servers is determined by the type of the license, purchased by the brokerage company.

Due to the fact that many auxiliary functions are carried over to separate servers, performance of the MetaTrader 5 trade server increased 7 times (!) as compared to that of MetaTrader 4 Server.

MetaTrader 5 Access Server

Access servers are analogues of data servers (Data Centers) in the MetaTrader 4 platform. Access servers perform the following functions:

  • processing and routing of incoming client connections;

  • processing of authorization requests and transmitting them to a trade server;

  • check of the activity of client connections to prevent attacks and overload of a trade server (antiflood control);

  • storing of history data, depth of market and news to reduce the load on the history server;

  • caching and providing LiveUpdate to client terminals.

Access severs cache the most part of information transmitted to clients, and participate in the process of user authentication. This reduces the load on trade servers, allowing them to deal with priorities - such as the execution of transactions and recording of data.

Several access servers can be installed for each trade server. Terminals switch between them automatically depending on priority settings.

Access servers significantly increase the security of the platform being protection against potential DDoS-attacks. All trade servers can be hidden behind access servers, thus protecting the kernel of the platform from attacks. If any DDoS-attacks appear, the entire impact will fall only on publicly available access servers, which also have mechanisms of protection against distributed attacks.

MetaTrader 5 Web Server

The web server enables clients to make transactions and access to the account not via a client terminal, but through the web interface on the broker's website. In this case, connection to accounts and trading are performed using an Internet browser via a secure HTTPS protocol.

You won't need to think about the complex integration of a website with the trade server. The web server enables you to control a trade account from the window of any Internet browser.

Currently, MetaTrader 5 Web Server is under development.

MetaTrader 5 History Server

History servers perform the following functions:

  • receiving, filtering and packing price and news data;

  • storing and providing of price history in the form of minute bars and ticks;

  • storing and providing of the news stream;

  • receiving, check and distribution of LiveUpdate between MetaTrader 5 servers.

Functions of storing and providing of price and news data, as well as filtering of quotes, are no more performed on the trade server side, but carried over to separate history servers. Also, history servers receive and distribute updates of MetaTrader 5 components. Assigning theses functions to a separate component (servers) also significantly reduces the load of the trade server.

MetaTrader 5 Backup Server

Backup servers are used for creating backup copies of data that will be used in case of failure of a trade or history server. They regularly create backup copies of client and trade databases, server settings and history data of the history server.

One or more backup servers are associated with each trade server. The possibility to create such a scheme, when a few backup servers will be kept for one server, increases the reliability and fault tolerance of the system.


Data Feeds and Gateways

External data feeds are used for receiving quotes and news on the MetaTrader 5 platform. Data feeds transmit information to the history server, which then translate it to access servers and terminals. Several data feeds can be used. If so, you can instantly switch to another data feed in case one of them fails.

The MetaTrader 5 includes a set of data feeds (e.g., IQFeeder). In order to use them, you will need only to contact the quote supplier and purchase a subscription. To create and integrate custom data feeds, we provide a specialized library for developers - MetaTrader 5 Gateway API.

Gateways are special applications that allow implementing the interaction of MetaTrader 5 with other trading systems and stock exchanges. Ready gateways, as well as the API for their development will be presented later.


As is known, in distributed systems, it is much more difficult to guarantee the security of information processed. In addition, being the software for working with financial data, the MetaTrader 5 platform should meet the highest standards of information security.

That's why, the developers paid special attention to the issues of data protection, when designing MetaTrader 5. The full description of security mechanisms is beyond the scope of this article, therefore, we will only give a brief overview of the main aspects:

  • The entire exchange of data between the platform components is closed, all the network traffic is encrypted.

  • Trade information is stored on servers and client terminals in an encrypted form.

  • The terminal is connected to the server through the process of bilateral authentication. Not only the client confirms authenticity, but also the trade server goes through authorization on the client terminal. This ensures that the trade server is the very server, which it claims to be.

  • In addition to standard authorization mechanisms, the extended authorization mode can be enabled on a trade server, which involves the use of SSL certificates.

  • The database of accounts of a client terminal is bound to a user's account in the operating system and computer configuration. If a user tries to authorize in the terminal under another account in the operating system, or when the terminal data are transferred to another computer, the entire database of accounts will be deleted during the start of the terminal.

  • trade servers are protected from potential DDoS attacks through the "Antiflood control" mechanism on access servers. This mechanism blocks the IP addresses that send too frequent or inappropriate requests. In addition, access servers are a reliable guarding of the trade server - all client connections are established through access servers. Thus, you can completely block access to the trade server from the external network; all communications with the outside world will be performed through other server components of the platform.


MetaTrader 5 is the newest and up-to-date of all solutions that currently exist in the market of trading platforms. During the years of development and promotion of MetaTrader 4, we have performed hundreds of successful implementations in brokerage companies and banks around the world. We took this experience into account when developing MetaTrader 5.

The architecture of the MetaTrader 5 trading complex is fundamentally different from its predecessor. The MetaTrader 5 trading platform consists of several components - servers. Each server performs its strictly defined functions. This approach allowed us to significantly increase the productivity and improve the fault tolerance of the system as a whole.

The distributed architecture of the MetaTrader 5 platform allows creating a cluster system for processing clients' trade requests. Having installed several trade servers, the administrator can configure the routing of incoming requests in such a way as to optimally distribute the load among the trade servers.

From the client's perspective, the server looks like a coherent whole - when a client connects, the access server defines to which trade server the client belongs, and redirects his requests on the appropriate trade server. This scheme allows you to easily scale the system, increasing the number of trade servers as the client base increases. Moreover, access servers almost completely eliminate the load associated with clients' activity, from the remaining components of the system.

And finally, this scheme makes MetaTrader 5 resistant to various kinds of attacks: if several access servers are installed, it is virtually impossible to hold DoS, DDoS or other types of attacks on them. Even after a successful attack, loss of one or several access servers will not cause system shutdown. It is almost impossible to attack the trade server from the outside - there is no direct access to this server from the open network, while all the clients' requests are check and filtered out by access servers.

©2019 by Nerico Brothers     

81 rue de France, 3ème étage, CS 21037, 06048 Nice Cedex 1, Nice