The Quick Metatrader 4 vs Metatrader 5 Roundup 2018


Metaquotes has been trying for a couple of years to replace Metatrader 4 with the new and allegedly improved version 5. In this post, I will try to shed some light on the reasons why this has failed so far and how the two versions compare to one another now.


in 2009 Metatrader 5 was introduced by Metaquotes as the successor of the popular Metatrader 4 platform which has been the de facto standard for retail forex trading since 2005. While the graphical surface is much alike, MT5’s scripting language is very different.
Whereas MQL4 is allowing for rapid prototyping by procedural programming, making it rather beginner-friendly, MQL5 requires a more complex approach (handling of objects and references). What is a plus for the seasoned programmer, just adds another layer of complexity to the beginner for very limited added value.

As Metaquotes missed out on the opportunity to implement some kind of wrapper onto MQL5, granting backwards compatibility with MQL4, its huge codebase consisting of a vast number of free indicators and expert advisors was no longer usable. Making Metatrader 5 a very unattractive choice.

On top of that many popular and elementary features have been missing in Metatrader 5. You weren’t able to hedge, there was no option to import custom history data and you couldn’t create offline charts, which was particularly important to traders who rely on Renko Charts or want to use more exotic timeframes.

The points listed above are probably the main reasons why MT5 never really gained any traction and has been living in the shadow of its older sibling MT4 for almost 10 years now. However, as of version 1090 in 2017, Metaquotes won’t provide any further updates to MT4 and seems willing to really push its successor. This fact and the news that one of my favourite brokers Darwinex has now started offering MT5 accounts are reasons enough to take a deeper look into what has changed since the initial launch of MT5.

Metatrader 5 – Look under the Hood

My main reasons for not switching to MT5 where its lacking ability to import custom price data in tick format, its “no-hedge” rule and the fact that it hasn’t been adopted by many of my prefered brokers so far.

Since 2016 MT5 finally allows for a “hedging-option”, making its position management almost identical to MT4, which is essential if you are running a couple of expert advisors on one account. Since mid-2017 MT5 even allows the user to import custom price data in tick and bar form (look here on how to do it). As of 2018 Darwinex is offering MT5 accounts πŸ™‚

So with no excuses left let’s take a look at MT5’s capabilities.


One of its major improvements is the new backtester. It comes up with some new highlight features:

  • Multithreaded Architecture
    In MT4 the optimizer was only able to use one CPU core whereas MT5 will now utilize all available cores, giving it an enormous speed advantage during optimizations.
  • Distributed Computing
    You can now make use of a network of so-called “agents” to perform input parameter optimizations. You have the choice to either use your own PCs or optimize within the Metaquotes cloud which is a cluster consisting of thousands of MT5 users who provide their computing power for a small fee.
  • Multi-Currency-Backtest
    With Metatrader 5 there is the option to do backtests over multiple currency pairs, allowing for the creation of diversified portfolio expert advisors, or playing with Triangular-Arbitrage.
  • Detailed Reports
    The backtest reports of MT5 are more detailed and include a breakdown of trades and profits by weekday and hours as well as holding times (Example). You can also get very in-depth reports from MT4 using the highly recommended Quantanalyzer.
  • Forward Test
    You are now able to run backtests with user defined in- and out-of-sample periods.
With MT5’s new computing power and especially its cloud optimization you have to be careful not to get fooled by randomness. Having the possibility to do optimizations over all kinds of indicators and input parameters in short time gives you the option to create stellar looking backtests rather representing an anomaly than a robust trading system. More info on that matter:


  • More Instruments (Stocks, Futures)
    Metatrader 5 is technically able to also trade stocks and futures whereas Metatrader 4 was restricted to Forex trading.
  • “Depth of Market”
    You can now also use the “Depth of Market” for trading. For Future trading, you can also look at “time & sales” data as well as “Tickcharts” with corresponding transactions (more info here).
  • Additional Order Types
    MT5 introduces two new order types “Buy Stop Limit” and “Sell Stop Limit”.
  • Async Order Execution
    Whereas with Metatrader 4 you had to wait for the trading server to confirm your first order before doing the next transaction, MT5 allows the user to send a batch of async orders without having to wait for the confirmation from the broker and handle potential errors afterwards. So if you wanted to close or modify dozens of orders at once, this will take considerably longer with MT4. The grid traders out there know what I am talking about πŸ˜‰


We are only considering backtesting performance. These performance tests have been conducted with 1 year of Dukascopy Tickdata (2017) containing 21,641,732 unique ticks using Metatrader’s “Real Tick Mode”. I have been testing the “Moving Average” Expert Advisor that is included in every default Metatrader installation. I have also created an “MT4-style” version of the Moving Average Expert for Metatrader 5.

The local optimizations were running on a 4 core Virtual Machine and the Cloud Optimization on a Dual Xeon Server with a total of 28 cores.

Setup Passes Total Time Time / Pass
MT4 Backtest 1 27.547s 27.547s
MT5 Backtest 1 21.406s 21.406s
MT5 Backtest (MT4 Style) 1 26.890s 26.890s
MT4 Optimization 36 11m 23s 18.972s
MT5 Optimization 36 4m 11s 6.972s
MT5 Optimization (MT4 Style) 36 5m 56s 9.889s
MT5 Optimization (Local Cloud) 5000 1h 13m 48s 0.922s

Final Thoughts

Users running their Metatrader Terminal on a VPS with limited RAM and CPU power will have to consider that Metatrader 5 is more resource hungry than its ancestor. MT4 is said to have 1/3rd of MT5’s memory footprint. Though, the usage of resources is highly dependant on additional factors like opened charts, attached indicators etc. These numbers are to be expected as all those shiny new features and performance improvements come at a cost (comparable to new Windows Versions).

The documentation is pretty good and extensive as it already has been for MT4. With almost 9 years gone since its launch, there is also a decent amount of code examples (indicators, experts, scripts, etc.) available which should help to transition to version 5.

Rumour has it there will also be an API version of the Metaquotes economic calendar usable in MQL code, which would make news aware trading and backtesting a whole lot easier.

I am still not totally comfortable with MQL5’s rather clumsy order and indicator handling. While there do exist some unofficial wrappers, that are trying to provide MT5 compatibility with mql4 code, those wrappers are more of a hack than a serious alternative to mql5 though. They may or may not work depending on the complexity of your code and they most likely will impose some performance penalty. So converting your old MQL4 code will require some work, unfortunately.

When doing backtests in MT4, I also often look at the visual backtest to get a feeling for the trading behaviour and spot some obvious errors in my experts. While you still can do this with Metatrader 5, I haven’t found a way to draw lines onto this visual backtest, sadly.

While it has never been a big issue for me personally, as I have not been using offline charts extensively, there has been a lot of disappointment among many traders in MT5’s lacking ability to create offline charts. This used to be a good way to provide custom exotic timeframes or time-independent charts like Renko Bars. Coincidentally, since today there also is the possibility to create offline Renko Charts within MT5 using the Renko 2.0 Offline EA.

All in all, MT5 has come a long way since its launch and matured quite a bit. Give it another 9 years and it probably will have bumped MT4 completely πŸ˜‰

Disclaimer: Metatrader is the registered trademark of MetaQuotes Software Corp. KlondikeFX is not associated with or sponsored by MetaQuotes Software Corp.