Discussing the article: "From Basic to Intermediate: Object Events (IV)"

 

Check out the new article: From Basic to Intermediate: Object Events (IV).

In this article, we will complete what was started in the previous one: a fully interactive way to resize objects directly on the chart. Although many people imagine that creating something like this would require much deeper knowledge of MQL5, you will see that, using simple concepts and basic knowledge, we can implement a way to work with objects directly on the chart. This leads to a very interesting and quite compelling result.

What we saw in the previous article is far from making full logical sense, at least if we look only at the current code available in the attachment, which you can study, practise with and use to understand how such interaction can be created with a very small amount of code.

The code in the file attached to the previous article has not yet fully matured. Although we have already shown several things that can be implemented toward a rather curious main objective, and in a very simple way, it still does not allow us to interact with objects in the way we want. In short, this code creates only what can be seen in Animation 01 below.

Animation 01

Although this may seem like something silly and not particularly useful, this animation shows us the potential already built into this code, since it allows us to create an outline around the selected object. However, our goal is not only to create such an outline, but also to resize the selected object. This is where some confusion begins. This is exactly where some difficulties appear, especially for those who have not practised and studied what was shown in the previous articles.


Author: CODE X