MetaTrader 4 vs 5 (MT4 vs MT5): Two languages and terminals, similar, yet tantalizingly different.
MetaTrader 4 vs 5, it is a decision that many traders have to make when they open an account. However, it is also a decision that is often made by the brokers themselves. The decision to have MetaTrader 4 and/or 5 available to traders or even to support a MetaQuotes terminal platform is up to the individual broker. Many brokers continue to use MetaTrader 4 (MT4) even with the existence of MetaTrader 5 (MT5). MT4 is a older platform that is very popular and continues to be used by many traders, MetaQuotes stopped updating this platform, but has not deprecated it to force brokers to buy licenses for MetaTrader 5. On January 12, 2018, MetaQuotes stopped issuing new MT4 Licenses to new brokers, which means that these brokers would need to adopt MetaTrader 5 or choose another terminal. The lack of support in terms of server resources for existing MT4 License Holders will result in tough decisions to be made. With this in mind, let's examine the two terminals and their languages.
MetaTrader 4 vs 5 is a matter of familiarity, ease of use and the all-important MQL language.
MetaTrader 4 vs 5 (MT4 vs MT5) Languages (MQL4 vs. MQL5)
MetaTrader 4 was released in 2005 and MetaTrader 5 was released in 2010. The languages have similarities, but there are very key differences that make it impossible for an MQL4 file to run in MT5 and vice-versa as it applies to MQL5 and MT4.
MQL4 and MQL5 are based on the C++ programming language. Updates in MQL4, which maintained popularity even after the release of MQL5, helped smooth out some of the differences in the languages.
However, what makes MQL4 and MQL5 intriguing and even downright challenging as programming languages is that while there are updates to programming languages like Python or Ruby, the changes in MQL4 and MQL5 go against the marketing from MetaQuotes that promotes a set it and forget it sort of approach to trading with "robots" (Expert Advisors) and custom indicators. This promotion actually makes it more challenging because newcomers who found that their MT4 version updated or would find that their MT5 version updated actually wake up to the cruel reality of the seemingly never-ending Software Development Life Cycle.
MQL4 is no longer being updated, but MQL5 is a constant work in progress. This makes the barrier to entry to MetaTrader 4 much lower for newcomers. It all boils down to Easy and Relative Limitations in Capability vs. Challenging and Robust Capability.
MetaTrader 4 vs 5 (MQL4 vs MQL5) Pros and Cons...
- No longer being updated, which means there's no need to update programs based on new versions.
- The language is what it is, it will not change.
- Expert Advisors and Indicators can be self-contained within one .mq4 file, the .ex4 file is just for execution.
- More brokers use MT4, which means knowing MQL4 has more benefits.
- Simpler to code. Expert Advisors and Indicators can be short and templated with ease.
- Multi-currency capabilities.
- No hedging capabilities.
- Limited by the capabilities that are in the terminal as a whole.
MetaTrader 5 (MQL5)
- Updates are made, which can make the language function better.
- There's a more robust nature to the language as the terminal is more advanced.
- Hedging capabilities
- Multi-currency capabilities
- Greater allowance for complexity
- If transitioning from MQL4, this is a radically different and more complex language.
- Libraries are integral.
- One Expert Advisor may have multiple libraries and files associated with it.
- Nothing is self-contained.
For those accustomed to MQL4, which would be many individuals, crossing over to MQL5 would be a frustrating experience because while MQL5 has a terminal and capabilities that are desired, the language and structuring of programs forces one to learn a far more complex language than what may be worth the effort.
MQL5 was not built with the new programmer in mind, it is a very object-oriented language.
The actual differences between the languages can be a bit startling and it will force many to have to re-learn everything when going from MQL4 to MQL5. For those who try to convert an .mq4 file in MetaTrader 5, it is an impossible task. Conversion tools simply do not work in bridging the massive divide in terms of code structure between MetaTrader 4 and MetaTrader 5. It's a case of having to build the necessary .mqh files and the .mq5 file or multiple .mq5 files to accomplish the same task, but the actual code is more robust in capability, especially in backtesting.
MetaTrader 4 vs 5 Testing Capabilities
Testing and Review are critical elements of the Software Development Lifecycle. MetaTrader 4 and 5 have a different approach to this and it is a bit deceiving if you are an MQL4 programmer. Both have the familiar Strategy Tester, but the Strategy Tester in MT4 is slow, woefully behind (and even downright inaccurate!) and very limited compared to the Strategy Tester in MT5.
- The woefully inaccurate factor is that the "Every Tick" model requires the import of the individual ticks from an external source, which creates inaccuracies between the broker and the tick data provider.
- "Every Tick" model is not every tick factored into the backtest without the import of the individual ticks, it's a bit deceiving and the accuracy of the backtest is poor without it.
- It takes quite a bit of time and computer resources to test an Expert Advisor or even verify that a strategy with an indicator works in the first place.
- The very limited nature of the tests concerns the inability to hedge and place multi-currency pair trades. Every Expert Advisor is limited to a particular currency pair.
In MetaTrader 5, this was improved upon:
- The Every Tick model based on Real Ticks does not require a third party service and it is all accurately based on the ticks provided by the broker. No extra work.
- The speed is much faster to process the backtest.
- Multi-currency pair utilizing Expert Advisors can be tested and hedging can be tested as well. Statistical arbitrage strategies can be tested with this approach.
An interesting phenomenon is that developers will create an Expert Advisor to be used in MetaTrader 4 and then code it for testing use in MetaTrader 5 to take advantage of the most accurate testing method available.
Testing and language are the two biggest sources of major differences when examining MetaTrader 4 vs 5. Of course, if you want to use MT4 signals, you have to use a MetaTrader 4 License Holding Broker and MetaTrader 4 Terminal. You cannot run an MT4 signal from MetaTrader 5 and vice-versa.
MT4 vs MT5 is not necessarily a decision to make. You choose the platform(s) that have the strategies you wish to implement for your Forex Investment Portfolio.
Find out more about Freevestor Portfolio Advisory Services and get started on the path to a free consultation by signing up for the Free Report that is promoted or going here.