MetaEditor provides convenient functionality for working with large projects, allowing users to combine files into a single structure, manage project settings and develop applications in teams via the online MQL5 Storage repository with version control.
A project is a separate file with the MQPROJ extension, which stores program settings, compilation parameters and information about all files used in the project. A separate tab in the Navigator is provided for work convenience within the project. All files, such as include, resource, header and other files are arranged into categories on this tab.
Creation of a new project is as easy as the creation of a normal MQL5 program. Click New Project and select the type of the desired program in the MQL5 Wizard:
Then complete standard MQL5 Wizard steps: set the type, name and properties of the desired program, as well as select appropriate event handlers.
If you already have developments in the form of MQ5 files, you can easily transform them to a project. Select a file and click New Project from Source in the file context menu:
In the directory where the selected file is located, a new project file with the same name and the mqproj extension will be created. The main program properties specified in the source code via #property will be automatically added to the project, including the name, copyright, version, link to the developer's site and program description. All files included in the source code through the #include directive will be added to the Dependencies section of the project.
Main project settings can be accessed from a separate dialog box instead of editing the source code as it is normally done in separate MQ5 files. To open project settings click Properties in the project context menu. The following project settings are available:
The set of program properties in the project file is given a higher priority, than properties specified in the program code. If properties are specified both in the project and in the source file, properties from the project will be used.
All files used in the source code are added to the project navigator automatically. For example, if you include a new MQH file using the #include directive, it will automatically appear in the Dependencies section of the navigator. Used header files are added to the Headers section; images, sounds and other MQL programs used in the project as resources (via the #resource directive) are added to the Resources section.
MQ5 files with the source code are displayed in the Sources section. Other files, such as set files for testing and chart templates, can be added to the "Settings and files" section.
Use context menu commands to add existing files to a project or to delete files from it. Be careful when deleting files, since you can remove a file from the project (remove the binding) or completely delete it from the hard disk:
The "Add existing folder" command enables a batch addition of all supported files from the selected directory into the project.
A file added to the project manually is not included to the program code and is not copied to the project directory. The file is only linked to the project to be displayed in its navigator.
To compile an executable EX5 file, open the project or the main MQ5 file of the program, and then run the compiler command (F7). The resulting executable file will be created in the same directory, where the project file MQPROJ is located.
MetaEditor allows programmers to remotely develop MQL5 applications in teams. The MQL5 Storage online repository is integrated into the editor:
Shared projects are managed from a separate Shared Projects section. If you have not activated Storage yet, execute the Activate MQL5 Storage command from the context menu of the desired folder. MetaEditor will check if your storage contains any saved data and if there are any shared projects available to you. All available data will be retrieved from Storage and uploaded to your computer. Available group projects appear in the Shared Projects section. To retrieve the projects, execute Checkout from Storage in the context menu.
To create a new group project, select the Shared Projects folder and click New Project:
Then complete standard MQL5 steps: set the type, name and properties of the desired program. For group projects, you should use clear and understandable names, so that other participants could easily find them. Only Latin letters and numbers without spaces can be used in project names.
A created project is immediately added to the MQL5 Storage. Standard Library files used in the project are not added to the storage, and you can add them manually.
To allow other participants to work with the project, open the project properties. You can grant permissions to selected users and set general parameters for the team work:
To grant permissions to a selected user, click on "add new user" and specify the MQL5.community login of this user. Then select permissions:
When you compile a group project, the executable EX5 file is automatically copied to the local Experts, Indicators or Scripts directory depending on the program type. It allows you to instantly run the program in the platform without having to copy it manually to the proper directory.
Each shared project in MQL5 Storage has publicity settings: the project can be private or open to other users. All projects that you can join are displayed in the separate Public Projects tab.
Click Join in order to join a project. After that the project will appear in the Shared Projects section. Then click Update from Storage in the context menu of the project in order to download it to your computer.
Each joined user gets read-only rights. Contact the project author to be able to submit your changes. To know his or her MQL5.community login, open the project properties via the context menu: