Download MetaTrader 5

Delete Sub Window

To add comments, please log in or register
rod178
272
rod178  

After removing all Objects from a sub-window eg ObjectsDeleteAll(2), I want to delete the sub-window.

Is there a function for that operation?

qjol
3243
qjol  

delete the sub window ? or you mean close it ?

ChartClose

but if you gonna close it why delete objects first ?

Alain Verleyen
Moderator
32410
Alain Verleyen  
qjol:

delete the sub window ? or you mean close it ?

ChartClose

but if you gonna close it why delete objects first ?

To be sure there is not a dirty windows wandering somewhere in MT4.
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI  
lol .. nice .. XD
rod178
272
rod178  
qjol:

delete the sub window ? or you mean close it ?

ChartClose

but if you gonna close it why delete objects first ?


Close or Delete a sub-window- is there a difference?

ChartClose(ChartID()) closes all the Chart, not just the sub-window. (in my case 3)

I deleted the object first as that is the programmed Trigger to close the now empty sub-window.

qjol
3243
qjol  
ho, not the main window ?! ChartIndicatorDelete
Alain Verleyen
Moderator
32410
Alain Verleyen  
qjol:
ho, not the main window ?! ChartIndicatorDelete
This doesn't necessarily delete the subwindow.
rod178
272
rod178  
angevoyageur:
This doesn't necessarily delete the subwindow.


It only deletes the selected indicator in a sub window, not the sub window

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI  
It deletes all indicator inside the chart though.
Alain Verleyen
Moderator
32410
Alain Verleyen  
deysmacro:
It deletes all indicator inside the chart though.
rod178:


It only deletes the selected indicator in a sub window, not the sub window

In sub windows or chart window.
rod178
272
rod178  
angevoyageur:
In sub windows or chart window.


Yes, although that is easily determined via the second parameter,

However that is not the issue, which is - I am still left with an empty sub-window.

EDIT: Seems that we have reached a dead end on this ie there does not appear to exist a function to remove orphaned sub-windows

However there appears to be a potential workaround using ChartApplyTemplate()

Some downsides are that EAs will have to be reloaded. So not an optimal solution

Probaly a better solution would have been to use CHART_WINDOW_IS_VISIBLE., unfortunately it is read only

12
To add comments, please log in or register