This article takes a detailed look at using subwindows in MQL5 indicators: creating them, detecting instances, and preventing duplication. It also covers INDICATOR_SHORTNAME, querying information about chart windows and indicators, and the difference between displaying indicators in the main chart window and in a separate window. The article also shows how to set the height and boundaries of a subwindow to standardize the interface and simplify the placement of objects.
In the previous article, “From Basic to Intermediate: Subwindows (II),” we looked at some of the errors and issues we might encounter when trying to use an indicator in a subwindow. What's more, we also noticed that MetaTrader 5 handles indicators in a rather ingenious way. All of this is done to avoid potential conflicts between the data that these indicators provide us with as we use them.
As shown in the previous article, with the right knowledge, there’s a lot we can do in MetaTrader 5. And all of this is done using plain and simple MQL5. Without any frills or unnecessary extras. As many of you have probably already noticed, I'm not too fond of sticking to strict logic. I like to think outside the box and spot possibilities that many people don't even suspect exist—things that can be done or situations that could arise. That's why I understand that many of you are probably already looking forward to the opportunity to tackle more challenging tasks. But, as a wise person would say, let's not rush things.
So, let's focus on what this article will cover and set aside anything that might distract us while we're reading. Because here we'll see that things aren't quite the way many people imagine them to be.
Check out the new article: From Basic to Intermediate: Subwindows (III).
In the previous article, “From Basic to Intermediate: Subwindows (II),” we looked at some of the errors and issues we might encounter when trying to use an indicator in a subwindow. What's more, we also noticed that MetaTrader 5 handles indicators in a rather ingenious way. All of this is done to avoid potential conflicts between the data that these indicators provide us with as we use them.
As shown in the previous article, with the right knowledge, there’s a lot we can do in MetaTrader 5. And all of this is done using plain and simple MQL5. Without any frills or unnecessary extras. As many of you have probably already noticed, I'm not too fond of sticking to strict logic. I like to think outside the box and spot possibilities that many people don't even suspect exist—things that can be done or situations that could arise. That's why I understand that many of you are probably already looking forward to the opportunity to tackle more challenging tasks. But, as a wise person would say, let's not rush things.
So, let's focus on what this article will cover and set aside anything that might distract us while we're reading. Because here we'll see that things aren't quite the way many people imagine them to be.
Author: CODE X