Forum on trading, automated trading systems and testing trading strategies
General rules and best practices of the Forum.
Alain Verleyen, 2018.08.03 23:01
When you post code please use the SRC button !
After a little search for "closing open positions" and filtering for CodeBase: https://www.mql5.com/en/search#!keyword=closing%20open%20positions&module=mql5_module_codebase&method=2
I found: https://www.mql5.com/en/code/39835.
At the very< end is an example function that closes all position - I think you easily can change it according to your needs.

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
Here's the code:
I hope you guys can help me :)
Thanks in advance!