MQL5

MQL5 review explained by professional forex trading experts, All you need to know about MQL5 tutorial.

MQL5 Review

MQL4 (MetaQuotes Language 4) and MQL5 (MetaQuotes Language 5) are integrated programming languages designed for developing trading robots, technical market indicators, scripts and function libraries within the MetaTrader software.

The primary objective of MQL4 and MQL5 is automation of trading and facilitation of operational analysis. MQL4 and MQL5 comprises an extensive codebase source code library used for developing trading robots.

MQL5 Compiler

To develop programs in MQL4 and MQL5, MetaEditor – a compiler embedded in the development environment – was created. It is integrated in the MetaTrader 4/MetaTrader 5 trading terminals. MetaEditor allows convenient editing of program source code, automatic generating projects by a template, profiling code and remotely developing joint applications in conjunction with other people.

Differences between MQL4 and MQL5

One of the fundamental differences is the trading system setup. MQL4 is used for developing trading programs based on the order system and MQL5 is utilized to implement a positional system. In the MetaTrader 5 trading terminal there are strict delimitations between the concepts of position, order and deal. An order is a request to execute a trading operation, which may result in a trading deal. A position is the aggregate deals on a certain financial instrument.

MQL5 comprises an expanded list of trading functions for work with open orders, a list of open positions, order history and deal history. In MQL4, different functions such as OrderSend(), OrderClose(), OrderCloseBy(), OrderModify(), OrderDelete() were initially incorporated for performing each trade operation. These functions can be used to open/close and delete pending orders.

In MQL5 all trading operations are carried out by sending trade requests using only one function – OrderSend(). As a parameter, the function gets passed a request either to place a pending order, or to open by the market, or to cancel a previously placed order. Introducing the new function OrderSendAsync() to MQL5 enabled asynchronous trading operations.

An important novelty in MQL5 is Depth of Market and a new event type of handling Depth of Market information.

Capabilities

MQL4/MQL5 aims to directly address traders’ needs and requirements. It was developed for writing trading programs and is used only for that purpose. Functions for performing trade operations OrderSend(), OrderClose(), OrderCloseBy(), OrderModify(), OrderDelete() have been initially incorporated in the language and are used for changing the state of a trading account.

There are four program types that can be written in MQL4/MQL5.

  • Expert Advisors. Automatic systems trading by specified parameters and following a coded algorithm. Occurrence of a previously specified event like receiving a new tick, an alert about a new trading operation or even pressing a button or clicking a mouse, triggers the Expert Advisor to perform a programmed action.
  • Custom Indicators. Written by users, they are used along the ready-made indicators integrated in the terminals. Their function is purely analytical. Indicators do not perform trading nor carry out operations that slow down the interface stream such as sending emails or performing a random delay. The main task of indicators is to monitor a situation, reflect and interpret it and then submit to a trader for analysis.
  • Scripts. A script is a program intended for a single execution of an action. The start event is the only event type processed by the script.
  • Custom Function Libraries. In addition, there is an opportunity to create include files (#include). Include files allow you to include most frequently used functions and classes without directly pasting their source code into its program. Using functions and classes simplifies creating, debugging and compiling because when using dynamic libraries, functions load only when they are called directly.

If you like this article then tip ForexSQ.com foreign exchange trading experts please.

For more information about Metatrader5 brokers visit TopForexBrokers.com forex brokers comparison website.

Comments are closed.