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

 

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

In this article, we will examine how to implement a moving average calculation and what precautions should be taken when performing this calculation. We will also discuss overloading the OnCalculate function to know when and how to work with one model or another.

In the previous article " From Beginner to Intermediate: Indicator (I)", we began a practical discussion on how to create a very simple and lightweight indicator using minimal knowledge. While many might think that achieving results requires extensive coding knowledge, it turns out that even a beginner, with some effort, can create something relatively simple and functional. Moreover, in a rather elegant way, since most of the work is handled by MetaTrader 5. It is up to us to respond correctly to events. Then MetaTrader 5 will know what to do with the remaining information we process during these events.

You might think, «But that code we managed to create doesn't resemble any indicator I've ever seen before. And although we succeed in plotting something on the chart, it's not quite what I expected—I hoped I could do much more».

Alright, my dear reader, you might think all of this doesn't look very impressive, but you must remember that knowledge isn't acquired overnight: it needs to be cultivated. The goal of this series of articles is precisely that: to cultivate and spread knowledge. It's not about following the principle, "Do this because it will only work this way." So, let's see how far we've come in the previous article.



Author: CODE X

 

Hi!


Loved the article!


I think it would be more enjoyable using more images to describe what are you doing trough each step.