Disliked{quote} {quote} ...jeanlouie, notice that the user ony required this: Question to the Master Coders: Is it possible to open & close an indicator subwindow from a On/Off Button on the main chart ? If yes, which instruction code must be included in the Button ? Anyway, in the EA attached, you'll see that what you mention is also possible. The same approach can be applied to MT5 too. It could be done in different ways, it depends on what exactly is needed. {file}Ignored
Templates is a very limited 1-trick pony way of doing it. You are correct that it does do what was asked, if the user will only ever intend to remove/add 1 subwindow at a time, and you will only ever make 1 template save at a time, else you'll be making templates for every combination of subwindows used, and hope the user doesn't add in extra subwindows which will be removed if a template is loaded, or change any settings because they'll be wiped, and doesn't add any objects in the meantime either because they'll be removed too.
What the user was asking is also impractical, even if mql4 had an indicator add function. To make the request work even with that function, you'd need to save the name+settings+subwindow postion/order of every subwindow indicator removed in the life of the chart, to be ready for the user to load any of them back. Now the second problem is that there is no function to move a subwindow into a certain order either, so then you'd have to remove all subwindows and load them back in the right order. Third problem is that you cant save unique indicator settings. Fourth problem is you can't load an indicator with those unique settings it had at the time of it's removal. In other words it a whole lot of fuss for something that has little value.
All in all you are still unable pick and choose subwindows to remove and add back, in order, with their non-default settings, on command, without removing any other indicators/settings/objects. It's not a shot at you, it's just not doable within mql4, this isn't the first time it's been asked, and its not the first time that coders with far more experience and skills than me have said the same thing. eg if you didn't have the apply template function, how would you programmatically apply a template? It wouldn't be possible.
Tldr: So I'd say the user is best off with the subwindow minimizing. Adding indicators with unique settings and a subwindow position isn't possible.
QuoteDislikednotice that the user ony required this
1