Hello friends.I wrote this utility specifically for use in my profile with a large number of Expert Advisors and sets ("Joint_profiles_from_grid_sets" https://www.mql5.com/en/blogs/post/747929 ).Now, in order to limit losses on the account, there is no need to change the "Close_positions_at_percentage_of_loss" parameter on each chart.Just open one additional chart, attach this utility and set the desired percentage for closing all trades on the account.
The utility has the following functionality:
- " Close_trades_by_loss_percentage " - percentage of floating loss from the balance at which positions are closed; at 0 the function is not active.
- " Close_trades_by_profit_percentage " - percentage of floating profit from the balance at which positions are closed; at 0 the function is not active.
- " Close_trades_by_loss_money " - floating loss in deposit currency at which positions are closed; at 0 the function is not active.
- " Close_trades_by_profit_money " - floating profit in the deposit currency, at which positions are closed; at 0 the function is not active.
- " Select_trades " - if " All ", then consider all positions on the account simultaneously; if " by_Symbol ", then consider positions for different symbols separately; if " by_Magic ", then consider positions with different magic numbers separately; if " by_Magic_and_Symbol ", then consider positions for different symbols and with different magic numbers separately (this is the same as using the "Close_trades_by_profit_percentage" parameter in each Expert Advisor).