This depends on how you launched the program. Did you start it from MQL5 code as well?
If not, then you need to search the right program using GetClassName and then use PostMessage to send WM_CLOSE to it. At least that's how it worked with MT4 long time ago.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.