Lesson 2: Syntax in MQL5 - Singapore Forex Trading, Singapore Forex Academy, Singapore Forex Association

Header Ads

Lesson 2: Syntax in MQL5

The MetaQuotes Language 5 (MQL5) is an object-oriented high-level programming language intended for writing automated trading strategies, custom technical indicators for the analysis of various financial markets. 

It allows not only to write a variety of expert systems, designed to operate in real time, but also create their own graphical tools to help you make trade decisions.

MQL5 is based on the concept of the popular programming language C++. 

As compared to MQL4, the new language now has enumerations, structures, classes and event handling. 

By increasing the number of embedded main types, the interaction of executable programs in MQL5 with other applications through dll is now as easy as possible.

MQL5 syntax is similar to the syntax of C++, and this makes it easy to translate into it programs from modern programming languages.

As to the syntax, THE MQL5 language for programming trading strategies is very much similar to the C++ programming language, except for some features:
  • no address arithmetic;
  • no goto operator;
  • an anonymous enumeration can't be declared;
  • no multiple inheritance.