Full-featured projects are now available in MetaEditor. The program development process has become more convenient.
Now the main MQ5 program file does not appear as the project. The project is a separate "MQPROJ" file, which stores program settings, compilation parameters and information about all used files. Main
project settings can be accessed from a separate dialog box, so there is no need to specify them in the source code via #property now.
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. All files are
automatically added to the project navigator. For example, if you include a new MQH file, it will automatically appear in the "Dependencies" section of the navigator.
Support for new projects has also been implemented in the updated MQL5 Storage online repository. Now, it has become much more convenient to develop large projects through collaboration with other members of the MQL5.community.
New Shared Projects section is provided for group projects. A project created in this section is immediately sent to the storage: you can grant permissions to other users and start collaboration right away.
When you compile a project in Shared Projects, an executable EX5 file is automatically copied to the local Experts, Indicators or Scripts directory depending on the program type. You can easily launch the
program on a chart without having to copy files manually.
What's New in the MQL5 Storage Operation
To implement support for new shared projects, we have modified the protocol of operation with the MQL5 Storage. Therefore, you will need to perform a checkout of all data from the storage after the
platform update. Data stored at the MQL5 storage will not be lost or affected during the update.
Before updating the platform to the new version, we recommend that you perform the Commit operation to send all local changes to the MQL5 Storage.
The 'Checkout from Storage' command is unavailable now. Instead, the 'Activate MQL5 Storage' and 'Update from Storage' commands are used to receive data:
- If you haven't used the MQL5 Storage in the current MetaEditor instance, click 'Activate MQL5 Storage' in the context menu of the Navigator window. All catalogs and files available in your storage will
be uploaded to your local computer.
- If you are already working with the storage, click 'Update files from Storage' in the context menu of a certain project or the root MQL5 element in the Navigator window to receive data from the storage.
New Projects: Examples of Creation and Operation Details
A new project entity has been added in MetaEditor. A project is an mqproj file that stores common program properties and information about all used files. Now, program properties can be conveniently
managed from a separate MetaEditor dialog instead of manual modification of properties in the source code (using #property directives).
If you have available code, you can easily test new projects by using the 'New Project from Source' command.
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.
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.
Two new options for compiling MQL5 programs have been added to project properties:
- Enable additional optimization: applications with the optimization disabled are compiled faster, but execute more slowly.
- Check floating point dividers: applications with the check disabled work a little faster, because the zero divide error is not checked during code execution.
To work with projects, use a separate Project tab in the Navigator window. All files used in a project are displayed on this tab in a convenient form. When a project is generated from a source file,
all used include files (specified using the #include directory in the main MQ5 file and in its include files) are automatically added to the Dependencies section.
When a new include file is added to the source code, it also appears in the project Navigator. Used header files are added to the Headers section; images, sounds and other MQL5 programs used in the
project as resource are added to the Resources section. MQ5 files with the source code are displayed in the Sources section. In the 'Settings and files' section, you can add other files, such as set files for
testing and chart templates.
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:
Creation of a new project is as easy as the creation of a normal MQL5 program. Click 'New Project', select the type of new program and specify properties (such as name, event handlers, etc) in the MQL5
To obtain an executable EX5 file, you can open the project and press F7 (the compilation command) or open the main MQ5 file of the program and compile it.
Shared Projects in MQL5 Storage: Operation Details
Shared projects are managed from a separate Shared Projects section. If you have not connected the 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 share projects available to you. All available data will be retrieved from the storage and uploaded to your computer (the
checkout operation). 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
A created object 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 its properties. From here you can grant permissions to selected users by specifying their MQL5.community login, as well as set common parameters
for the group work:
- Private project
- Free to join project
- Join by request project
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 terminal without having to copy it manually to the proper directory.
Public Projects in MQL5 Storage: Participation in Development
As mentioned above, each group project in MQL5 Storage has publicity settings: the project can be private or open to other users. Now, all projects you can freely join are displayed in the separate
"Public Projects" tab.
Everyone can find an exciting project and take part in its development. Simply click Join and receive the project from the storage.
Each joined user gets read-only rights. Contact the project author to be able to submit your changes. To know his or her login, open the project properties via the context menu.