Delete Sub Window

 

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?

 

delete the sub window ? or you mean close it ?

ChartClose

but if you gonna close it why delete objects first ?

 
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.
 
lol .. nice .. XD
 
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.

 
ho, not the main window ?! ChartIndicatorDelete
 
qjol:
ho, not the main window ?! ChartIndicatorDelete
This doesn't necessarily delete the subwindow.
 
angevoyageur:
This doesn't necessarily delete the subwindow.


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

 
It deletes all indicator inside the chart though.
 
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.
 
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

Reason: