I have edited your post. In future please use the CODE button when you insert code.

- www.mql5.com
I have edited your post. In future please use the CODE button when you insert code.
Many thanks. Just as an update - not sure how it fixed the problem but I added a button to remove the Expert using the ExpertRemove() function and that did not close the chart, and oddly though, ever since then, removing the EA using MT5 Expert List dialog also does not remove the chart. I realise this does not help anyone but just an update on my process. As a guess, it may be that the debugger did not clean up some condition so it could be that there was no real problem to start with.
Many thanks. Just as an update - not sure how it fixed the problem but I added a button to remove the Expert using the ExpertRemove() function and that did not close the chart, and oddly though, ever since then, removing the EA using MT5 Expert List dialog also does not remove the chart. I realise this does not help anyone but just an update on my process. As a guess, it may be that the debugger did not clean up some condition so it could be that there was no real problem to start with.
thanks for this info, it is useful tip, just adding 1 more thing, we should explicitly Destroy() CAppDialog to avoid chart close issue on removing EA
Regads
Umair

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have written an expert advisor (admittedly first attempt) which uses a canvas as well as a cAppDialog to simulate the TradeView trade visualiser and it works great.
However, when removing the EA using the "Expert List" option on MT5, it also closes the chart to which the EA is bound.
I am clearly missing something basic in the logic and would appreciate guidance.
The code is pretty long but the Init and DeInit functions are as follows but do nothing special: