MetaTrader 4 is the most popular trading platform among Forex traders. It’s free, supported by over a hundred brokers, and offers traders the ability to program their own custom trading system and indicators in the MQL4 language. In 2010, MetaQuotes debuted the MetaTrader 5 platform, offering many improvements over the previous version.
Due to the continued popularity of MetaTrader 4, active growth in MetaTrader 5 and the number of brokers currently offering live accounts, the new version is slowly becoming available. But for serious traders, MetaTrader 5 is also worth a look.
The new platform offers many features missing in MetaTrader 4, such as the ability to customize chart stages, new chart items and indicators, a built-in trading calendar, and support for additional instruments such as stocks and futures. Strategy Tester allows traders to test systems in multiple currencies, adds forward testing and supports multiple processors and remote agents to facilitate optimization.
The MQL5 language is a complete overhaul from MQL4. Many new features have been introduced, including object-oriented programming (classes, objects, etc.), structures and enumeration, new data types and event handlers, and more. Many new functions were introduced, and the existing functions were completely changed. However, MQL5 is more powerful than its predecessor, and is able to build and powerful trading systems.
Even for experienced MQL4 programmers, learning MQL5 can feel like learning a new language. A new MQL5 programmer should familiarize themselves with object-oriented programming, learn new data structures, and work around the many idiosyncrasies of MQL5 programming.
When considering moving to MetaTrader 5, the first consideration is whether your trading system is suitable for MetaTrader 5. The new version handles orders very differently than MetaTrader 4. With MetaTrader 4, the trader can open in multiple orders of the same symbol, each has its own lot size, order opening price, stop loss and take profit. Each order is different from the others, and for foreign brokers, you can watch and open buy and sell orders.
In MetaTrader 5, there is only one position open per symbol. The position is to buy or sell, and thus the prosecution cannot. The position has an order opening price, and the lot size is the net value of all opened buy or sell orders. The position also has a stop loss and take profit, and if the price changes, 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 of the same symbol, there is a position of 2 lots. The opening price of the position will be a weighted average of the opening prices of the two orders. A stop loss and take profit applies to the entire position. If you open an order to sell 1 lot, the resulting position is a position to buy 1 lot. If you open a sale order of 2 lots, it will result in a sale position of 1 lot. As orders are opened in the opposite direction, the direction of the position decreases or returns accordingly.
If your strategy depends on hedging, then MetaTrader 5 is not for you. If, however, your trading strategy opens multiple orders and you want to close part of the current position at a specific price, then pending orders can be used to increase 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. The 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 checking historical trades on MetaTrader, you can look at orders, deals or both. This is very different from MetaTrader 4, and will require some familiar practice. Stop loss and take profit amounts are listed in the trading log, and you should 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 thoroughly test your expert advisors, Strategy Tester enhancements alone will be worth the time and effort of coding new MQL5 expert advisors.
While MetaTrader 4 and 5 will live together for the foreseeable future, the advances offered by MetaTrader 5 are likely to convince sophisticated traders to make the switch.