I tried to use new panel/controls interface in MetaTrader. I took SimplePanel.mq4+PanelDialog.mqh from Indicators\Examples directory, put them into one file SimplePanelEA.mq4, moved to Experts directory and I removed OnCalculate function and "#property indicator_*" lines. After attaching to a chart my new file SimplePanelEA works fine, but the problem is with closing. Only if I close using "X" in the upper right corner of the panel everything is fine. But if I try to close a chart or whole terminal then the terminal freezes. Sometimes I can have in logs information that the expert was closed by timeout.
So my questions is: should new controls be used differently in Expert Advisors than in Indicators? If so, what should be changed in attached code? Or is it a problem (bug) in MetaTrader 4? The same code in MetaTrader 5 (file renamed to SimplePanelEA.mq5) doesn't cause any troubles during closing.
ServiceDesk of Metaquotes