Join our fan page

MQL5 Programming for Traders – Source Codes from the Book. Part 3 - expert for MetaTrader 5
- Views:
- 4475
- Rating:
- Published:
- 2023.12.15 14:29
- Updated:
- 2023.12.15 15:27
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
Part 3. Object Oriented Programming in MQL5
"Part 3. "Object Oriented Programming in MQL5" offers an immersion into the world of object-oriented programming (OOP) in the MQL5 language. Software development often involves the complexity related to the management of multiple entities, requiring advanced technology to improve programming convenience, productivity, and quality.
The OOP technology is based on the concept of objects, which are variables of a custom type defined by the programmer using MQL5 tools. Creating custom types allows the modeling of objects and simplifies the writing and maintenance of programs.
This part examines various ways to define new types, including classes, structures, and unions. These custom types can combine data and algorithms to describe the state and behavior of application objects.
The author dwells on the "divide and conquer" principle, showing that objects are mini-programs, each responsible for solving a small but logically complete task. You can combine objects into a single system and create products and services of arbitrary complexity.
To assist users in studying the capabilities of MQL5, Part "Object Oriented Programming in MQL5" introduces the principles of OOP along with practical implementation examples. The book also covers templates, interfaces, and namespaces, unveiling the flexibility and power of OOP in MQL5 developing programs.
Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/45592

Part 2 "MQL5 programming fundamentals" is an introduction to the key concepts of this programming language. This part of the book is devoted to data types, identifiers, variables, expressions, and operators. You will learn how to combine different instructions to form the program logic.

The first chapter of the book introduces the MQL5 language and development environment. One of the new features introduced in the MQL5 language compared to MQL4 (MetaTrader 4 language) is support for object-oriented programming (OOP), which makes it similar to C++.

In the fourth part of the book, we will focus on mastering built-in functions (MQL5 API) and will gradually delve into specialized subsystems. Any MQL5 program can utilize a plethora of technologies and functionalities. Therefore, it makes sense to begin with the most simple and useful functions that can be utilized in most programs.

In Part 5 of the book, we'll delve deeper into the APIs associated with algorithmic trading, including financial data analysis and processing, chart visualization, automation, and user interactions.