When you double click on an indicator or drag and drop it on a chart, a property window pops up.I am wondering if we can design a custom property window other than the default one that the metatrader provides.
For example, we may be inclined to remove or add some window tabs, or we may want to have some special tick boxes in the property window.
If the answer is "YES", could you kindly give some blue prints on the steps that a programmer should follow for this purpose. Please also mention that if your solution works in MQL4 or MQL5.
For example, we may be inclined to remove some of the unused tabs of this window in the default version, or we may want to have some special tick boxes in the property window.
Forum on trading, automated trading systems and testing trading strategies
Parameter window for custom indicators
Fernando Carreiro, 2021.07.07 22:38
Ooops! Is it the same for the expert advisors?
I just came across this nice topic, which is some how related to my question. In the comments section, Alain Verleyen suggests using Windows Messaging API. Have you tried this before?
No, it will not work, because it requires that you have an "outside" process carrying out the WinAPI manipulation on the properties dialog box.
When you place an Indicator or EA on the chart, none of your code is actually executed until the dialog box is accepted, so there is no way for the code in that indicator or EA to manipulate its own opening dialog box of properties.
Only an outside process could do that. Hence, it is not a possible for the Indicator or EA to do it itself, and also a very impractical approach even with an outside process.
One of my friends, @Yury Kulikov, told me that we can create custom property windows using these classes. He said, "On MQL5, you can make any GUI, even round, even animated. You can make a complete imitation of a standard window."
Furthermore, he kindly provided the following animation as an example. I think this is sufficient for our needs.
That is just a normal graphics panel, that you can even create in MQL4. However, that appears after the default "Properties" dialog-box presented by MetaTrader, when you initially attach it to a chart. You will not be able to substitute the default one.
That is just a normal graphics panel, that you can even create in MQL4. However, that appears after the default "Properties" dialog-box presented by MetaTrader. You will not be able to substitute the default one.
Yes, you are right. But this one is also fine for most of our needs. After rethinking my question, I came to the conclusion that what I really need is a custom property window associated with an object or indicator. It really does not matter if this window is the default pop-up window or something like this that shows up after reselecting the object or indicator. I think that this needs a lot more work and effort to be implemented in MQL4 than MQL5. Doesn't it?
Have you seen this video, Fernando? It seems that even the the default properties dialog-box is modified there? Am I right?
Please enable the necessary setting in your browser, otherwise you will not be able to log in.