Articles

From Basic to Intermediate: Structs (II) for MetaTrader 5

In this article, we will try to understand why programming languages like MQL5 have structures, and why in some cases structures are the ideal way to pass values between functions and procedures, while in other cases they may not be the best way to do it

From Basic to Intermediate: Struct (I) for MetaTrader 5

Today we will begin to study structures in a simpler, more practical, and comfortable way. Structures are among the foundations of programming, whether they are structured or not. I know many people think of structures as just collections of data, but I assure you that they are much more than just

From Basic to Intermediate: Template and Typename (V) for MetaTrader 5

In this article, we'll explore one last simple use case for templates, and discuss the benefits and necessity of using typename in your code. Although this article may seem a bit complicated at first, it is important to understand it properly in order to use templates and typename later

From Basic to Intermediate: Template and Typename (IV) for MetaTrader 5

In this article, we will take a very close look at how to solve the problem posed at the end of the previous article. There was an attempt to create a template of such type so that to be able to create a template for data union

From Basic to Intermediate: Template and Typename (III) for MetaTrader 5

In this article, we will discuss the first part of the topic, which is not so easy for beginners to understand. In order not to get even more confused and to explain this topic correctly, we will divide the explanation into stages. We will devote this article to the first stage. However, although at

From Basic to Intermediate: Template and Typename (II) for MetaTrader 5

This article explains how to deal with one of the most difficult programming situations you can encounter: using different types in the same function or procedure template. Although we have spent most of our time focusing only on functions, everything covered here is useful and can be applied to

From Basic to Intermediate: Template and Typename (I) for MetaTrader 5

In this article, we start considering one of the concepts that many beginners avoid. This is related to the fact that templates are not an easy topic, as many do not understand the basic principle underlying the template: overload of functions and procedures

From Basic to Intermediate: Overload for MetaTrader 5

Perhaps this article will be the most confusing for novice programmers. As a matter of fact, here I will show that it is not always that all functions and procedures have unique names in the same code. Yes, we can easily use functions and procedures with the same name — and this is called overload

From Basic to Intermediate: Floating point for MetaTrader 5

This article is a brief introduction to the concept of floating-point numbers. Since this text is very complex please, read it attentively and carefully. Do not expect to quickly master the floating-point system. It only becomes clear over time, as you gain experience using it. But this article will

From Basic to Intermediate: Definitions (II) for MetaTrader 5

In this article, we will continue our awareness of #define directive, but this time we will focus on its second form of use, that is, creating macros. Since this subject can be a bit complicated, we decided to use an application that we have been studying for some time. I hope you enjoy today's