It’s gratifying to see Metaquotes continue developing for MT4. I never migrated to MT5 due to my severe reservations about MT5’s position-centric (likely due to NFA’s nonsensical FIFO rule) vs MT4’s order-centric system. And while I’ve yet to find a tangible benefit of OOP over procedural coding, this unified MetaEditor will (or at least should) allow greater flexibility when the time comes that it is needed.
What’s neat is that they addressed the short-circuit evaluation issue I posted about at
This makes mql4 code faster(or cleaner if you’ve worked it all in like I had). Will time it when I have the time.(I.. don’t know how else to phrase this)
All said, normally when new features/programs are released, some existing feature gets broken, and Metaquotes has release the unified MetaEditor beta for bug testing.
- Present are line numbers at the side, breakpoints for easier debugging, functions list, highlighting of brackets, a ‘Styler’ for auto-formatting, etc.
- Compiling shows up non-critical warnings for implicit type conversion, of “not all control paths return a value” (I had one!), unused variables, etc.
Liking it so far.
What I would greatly desire is easier insertion of custom data for backtesting. If there are security issues introduced by manipulating cvs/hst/fxt files, by all means please have a separate offline backtesting program from MT4. MetaTester! 😀
On another semi-related note, what I would also very much like to see is a stripped-down MT4 (or API) specifically for automated trading, without all the frills like one-click trading, MQL5 Community, and allow disabling “Signals” and “Code Base” like the “News” tab, Feature creeping causes unnecessary bloatware.
Differences from the old MQL4 version:
- Changed the priority of AND/OR logical operations. Now, everything is similar to the standard C/C++
- Introduced shortened evaluation of logical expressions. Now, when a logical expression is evaluated before reaching its end, the remaining subsequent expressions are not evaluated, like in C/C++.
- Only integer values are now used in switch operator. Real values could have been used before
- A dot symbol cannot be used in variable names any more. Also, ‘@’, ‘$’ and ‘?’ symbols cannot be used in variable names
- Tightened requirements for start function. Parameters could have been set in start function before. Now, all init, start, deinit, OnInit, OnStart, OnTick, OnTimer and other entry points should exactly match their signatures
- Due to expansion of keywords, such names as short, long, float, const, virtual, input, delete, new, do, char cannot be used now
- Now, imported dll functions cannot accept MQL string arrays as a parameter, like in MQL5
- Introduced predefined _Period, _Symbol, _LastError, _CriticalError, _StopFlag, _Point, _Digits, _UninitReason, _RandomSeed variable names that may come into conflict with simple variables declared under the same names in existing source files
- datetime type has become an 8-byte one, like in MQL5.
The differences are not critical and can be easily corrected in the code. In return, we access multiple MQL5 features, improved execution speed and much more strict quality control.
Here are some upcoming changes:
- Complete replacement of MQL4 language and MetaEditor 4 with common MQL5 and MetaEditor components
Instead of working on MQL4 -> MQL5 compatibility, we have decided to go the opposite way. We have transferred the maximum possible amount of MQL5 language functions and features fully preserving MQL4 functionality. In other words, all powerful MQL5 functions, including ООP and the native code compiler, will become available in MQL4. To achieve this, we have developed a unified compiler that automatically supports both MQL4 and MQL5 languages. MetaEditor will also become a single application both for MetaTrader 4 and MetaTrader 5 platforms. Thus, it will be possible to compile both MQL4 and MQL5 from any version.
- MQL5 Storage will be available in MQL4 IDE
Thus, it will be easier to manage source code versions, participate in team operations and synchronize files.
- MQL4 code protection is considerably increased
New EX4/EX5 files are provided with a serious and completely revised protection.
- The market of applications will become available in MetaTrader 4
Transition to the new compiler that supports resources and conventional protection suited for each user’s PC will allow users to develop and sell full-fledged applications. There is no need to worry about the protection of EX4/EX5 files sold via the market – they do not contain bytecode but only a pure native code signed by our private key.This solution puts in order all the diversity of existing programs and protects the sellers.
- The market of MetaTrader 4 applications will open for MQL5.community in mid-August
Developers already can prepare their applications and register as sellers. We will start releasing the first beta versions of the terminal in a couple of weeks.
- We have many other extensive plans but it would be better to postpone them for a while.
No comments yet.