MetaTrader 4 Help


The built-in programming language has always been one of the most important parts of MetaTrader trading platform. Application development is not just the MQL5 programming language, whose undoubted advantages will be proved below, but this is also the editor in which you work with the source code. The new MetaEditor provides a lot of new features that were unavailable for users of the previous versions.

Personal Code Repository MQL5 Storage

MQL5 Storage is a personal MQL5 source codes storage designed for the versioned storing of files and managing all projects directly from MetaEditor 5 in a handy manner.

The source code is stored in a secure remote repository, which can be accessed through your account. In case of hard disk failure, the user's local copy of codes can be quickly restored from the storage.

Traders can access their storage from any computer. They need just to log in using their account in the MetaEditor. They work with the storage using the convenient context menu of the Navigator window.

Access to MQL5 Storage

Each transaction of changes in the storage is recorded. Later users can view the entire history of changes, compare versions of files using a special tool, as well as revert to any previous just one click.

Comparing files

The options of the MQL5 Storage will continue to expand. It will enable joint work with projects using the storage by giving permissions to the required accounts.


Without exaggeration, everyone who used the MetaEditor 4 wanted the debugging function. The appearance of the debugger in the fifth version has raised the development of MQL5 applications to a new level. All standard functions are available for debugging applications:

  • Breakpoints: place breakpoints in the source code lines, where the process of program execution must be interrupted to study the behavior of the program.
  • Watching Expressions: follow the values of any expressions during debugging in a separate tab of the Toolbox.
  • Stack of Calls: watch the stack of calls during debugging.
  • Step-By-Step Debugging: use the commands of the step-by-step debugging - Step Into, Step Over and Step Out.


Code Profiling

Debugging has greatly simplified the work of programmers. But MetaEditor 5 has another powerful tool for source code optimization. Code profiler detects all application bottlenecks.

Code profiler

Code profiler analyzes execution speed of the application's individual source code fragments. Analysis results are submitted to a programmer both by individual functions and lines. Thus, it is now possible to find the slowest parts of the code and optimize MQL5 program operation.

MQL5 Wizard

The MetaEditor 4 includes a Wizard for creating Expert Advisors allowing to generate templates for developing various applications. In the fifth version of the MetaEditor this component has been significantly redesigned. Its new name is the MQL5 Wizard. It still allows you to create templates of programs that are already properly designed and contain the necessary event handlers. However, the main new feature is the possibility to generate ready-to-use Expert Advisors. The trader must choose which signals the Expert Advisor will use, its money management strategy and the way it will be protected from losses (type of trailing stop).

Now the trader does not necessarily need to know how to program in MQL5, to get a ready-to-use Expert Advisor. An EA is generated in a few easy steps. Then you can start optimizing your Expert Advisor in the strategy tester.

Since the build 600 the fourth version of the client terminal has been switched to using MetaEditor from the fifth version of the trading platform. The unified MetaEditor is now used for both versions of the client terminal.