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
- www.mql5.com
//| Expert deinitialization function | //| Expert tick function |
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