Discussing the article: "From Basic to Intermediate: Technical Indicators (II)"

Check out the new article: From Basic to Intermediate: Technical Indicators (II).

In this article, we'll show you how to create an MQL5 indicator that plots multiple moving averages on a single chart, reducing the amount of duplicate code. This uses iMA, indicator buffers, CopyBuffer, PlotIndexSetInteger/String, and a const array of structures that brings together periods, methods, and colors. The sizes of `indicatorbuffers` and `indicatorplots` are determined based on `Averange.Size()`. This approach simplifies maintenance and allows you to add or remove moving averages by modifying just one list.

In the previous article, “From Basic to Intermediate: Technical Indicators (I)”, we looked at how to implement code designed to demonstrate how to use a technical indicator. The indicators described in that article are built into MetaTrader 5 and remain available on the platform. You can access them from MQL5 in a very simple and straightforward way.

However, everything stated there also applies to another type of indicator. Specifically, an indicator that you, my dear reader, implement to better understand a particular market movement. Before we get into that, though, we need to consider a few more issues that, in my opinion, will be very helpful in understanding how to use custom indicators in a wide variety of situations.

In addition, of course, this will allow us to better explain how to use MetaTrader 5 so that it shows us what we want to see—or even does what we need it to do.

To reach this level of understanding, it is necessary to explain a number of concepts that many people do not understand or are not even aware of, even though they can be used in MQL5 programming. Once these concepts have been properly explained and you understand them correctly, my dear reader, many doors will open for you on your path to becoming a good MQL5 programmer.


Author: CODE X