On July 24, MetaQuotes announced a set of major changes for the whole MT4 community. Among other things, they have promised a new IDE (integrated development environment) for MetaTrader 4 that would still compile .mq4 into .ex4, but will be able to work with all MetaTrader 5 functions, will add the whole OOP functionality, at the same time retaining the MT4 position/order system. That sounded quite good in everyone’s opinion.
On August 26, they have released a beta version of this new IDE. It was not too bad for a beta, but it introduced some problems. First of all, the directory structure for the source code files changed to that of MQL5, so if you have a lot of interdependent files, you will now have to redistribute them across the new directory structure. Then, there will be a lot of new warnings and (likely) errors showing up during compilation of the old code. Although the new IDE is designed to be compatible with both MQL4 and MQL5 languages, it rejects some of the valid MQL4 syntax:
- Variable names with dot symbol produce errors.
Switch-caseexpressions with anything but integers produce errors.
- If any of your MQL4 variables are called by one of the predefined language keywords from MT5 (e.g. _Period), you will get errors.
- Some other minor cases of new compilation errors.
Yes, the new IDE offers better functions, adds classes, provides better protection against decompilation (which is necessary to create an app store for MT4 scripts), but it also adds risk to invalidate thousands of previously correct code files and snippets. Will MetaQuotes be able to handle this task with minimum damage to the community? Or will the resulting loss of code base be a justified tradeoff for the features?
If you have some questions or comments about the ongoing merge of the MQL4 and MQL5 coding environments, please feel free to submit them using the form below.