Close by percentage MT4
- 유틸리티
- Konstantin Kulikov
- 버전: 1.8
- 업데이트됨: 5 12월 2025
- 활성화: 20
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). Another model for accounting positions is "Select_trades = one_given_magic_and_chart_symbol". When choosing this model, ONLY positions with a magic number from the "One_given_magic_number" parameter for the chart symbol to which the utility is attached will be taken into account. And another model for accounting positions is "Select_trades = one_given_magic_and_all_symbols". When choosing this model, the positions of all symbols will be taken into account simultaneously with the magic number from the "One_given_magic_number" parameter.
- "Also_delete_pending_orders_at_profit" - delete pending orders when closing in profit.
- "Also_delete_pending_orders_at_loss" - deleting pending orders when closing at a loss.
- Activate_partial_closing_of_positions - activate partial closing of positions when a specified floating profit or loss is reached.
- Percent_for_partial_closing - percentage of the volume of positions for partial closure.
- Time_for_Work - enable the Start_Time_Work and End_Time_Work time parameters when the utility will close positions (upon reaching the specified profit or loss conditions).
- Time_for_StopWork - enable the Start_Time_StopWork and End_Time_Work time parameters when the utility will not close positions under any circumstances.
- Info_on_Chart - display utility information on the chart.
Version for MT5: https://www.mql5.com/en/market/product/84990
Discuss the complexities of Forex trading here: chat "Age of Expert Advisors".

사용자가 평가에 대한 코멘트를 남기지 않았습니다