MetaTrader 4 is the most popular trading platform among Forex traders. It’s free, supported by over one hundred brokers, and offers traders the ability to program their own custom trading systems and indicators in the MQL4 language. In 2010, MetaQuotes debuted the MetaTrader 5 platform, which offers many enhancements over the previous version.
Due to the continuing popularity of MetaTrader 4, active development on MetaTrader 5 and the number of brokers currently offering live accounts, the new version has been slow to catch on. But for serious traders, MetaTrader 5 is worth another look.
The new platform offers many features missing in MetaTrader 4, such as the ability to customize chart periods, new chart objects and indicators, a built-in trading calendar, and support for additional instruments such as stocks and futures. The Strategy Tester allows traders to test systems on multiple currencies, adds forward testing and supports multiple processors and remote agents to speed up optimization.
The MQL5 language is a complete overhaul from MQL4. Many new features are introduced, including object-oriented programming (classes, objects, etc.), structures and enumerations, new data types and event handlers, and much more. Many new functions have been introduced, and existing functions have been changed entirely. Nevertheless, MQL5 is more powerful than its predecessor, and capable of building powerful trading systems.
Even for experienced MQL4 programmers, learning MQL5 can feel like learning a new language. A new MQL5 programmer will have to familiarize themselves with object-oriented programming, learn the new data structures, and work around the many idiosyncrasies of programming in MQL5.
When considering whether to move to MetaTrader 5, the first consideration is whether your trading system will be appropriate for MetaTrader 5. The new version handles orders much differently than MetaTrader 4. In MetaTrader 4, the trader can open multiple orders on the same symbol, each with its own lot size, order opening price, stop loss and take profit. Each order is separate from the others, and for foreign brokers, you can hedge and open both buy and sell orders.
In MetaTrader 5, there is only one position open per symbol. The position is either buy or sell, and as such it is not possible to hedge. The position has a single order opening price, and the lot size is the net sum of all opened buy or sell orders. The position also has a single stop loss and take profit, and if either price is changed, the SL or TP will change for the entire position.
For example, if you open two buy orders of 1 lot each in MetaTrader 5 on the same symbol, you will have a position of 2 lots. The position’s opening price will be a weighted average of both orders’ opening prices. A single stop loss and take profit will be applied to the entire position. If you then open a sell order of 1 lots, the resulting position will be a buy position of 1 lot. If you then opened a sell order of 2 lots, it would result in a sell position of 1 lot. As orders are opened in the opposite direction, the direction of the position decreases or reverses accordingly.
If your strategy depends on hedging, then MetaTrader 5 will not be appropriate for you. If however, your trading strategy opens multiple orders and you want to close out part of the current position at a specified price, then pending orders can be used to scale out of the position. The implementation may change, but you can do many of the same things in MetaTrader 5 that you can in MetaTrader 4.
There are three parts to a trade in MetaTrader 5. An order is a request to open a trade at a particular price. A deal is the fulfillment of an order, and a position is the result of one or more deals. When examining trades in MetaTrader’s history, you can view orders, deals or both. This is markedly different from MetaTrader 4, and will take some practice getting used to. Stop loss and take profit values are listed in the trading log, and you will have to consult the log when testing your trading system.
The MetaTrader 5 Strategy Tester offers significant improvements from the previous version, including multi-currency testing, expanded reports, forward testing and support for multi-core processors and remote testing agents. If you extensively test your expert advisors, the Strategy Tester improvements alone may be worth the time and effort of coding new expert advisors in MQL5.
While MetaTrader 4 and 5 will live side by side for the foreseeable future, the improvements offered by MetaTrader 5 will likely convince sophisticated traders to make the switch.