There are many X ses.
X to close splash dialog.
X to close the terminal.
X to close the chart.
X to close marketwatch.
X to close the navigator.
X to close datawindow.
X to close strategy tester.
X to close application dialog.
X to close messagebox.
X to close alert dialog.
And they all have a title bar too.
Why didn't you specify what exact window you mean ?
Assuming you mean a custom made dialog then:
If you know the object name you can check for it's state by ObjectGetInteger() and OBJPROP_STATE.
But since the dialog will disappear when they click the X you can simply check for the existence of the dialog itself by ObjectFind() function.
If it doesn't find the window it must have been closed.
And you can launch another event in chart event function.
And if you mean something else maybe you can use chart functions see Here.
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use