I have found the function terminalclose
https://www.mql5.com/en/docs/common/terminalclose
it's work very good
![Documentation on MQL5: Common Functions / TerminalClose Documentation on MQL5: Common Functions / TerminalClose](https://c.mql5.com/36/39/documentation-on-mql5-common-functions__1.png)
Documentation on MQL5: Common Functions / TerminalClose
- www.mql5.com
//| Expert deinitialization function | //| Expert tick function |
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I search how to close mt5 properly in mql5. I have a python script which launch one by one severals expert advisor.
My way in python is:
Python launch mt5, mt5 launch the EA, do the job, and python force close mt5 after 15sec timeout.
But sometimes 15sec is not a good timeout. So do you know how to close mt5 just after the end of the EA ?
Thank you