Exp_ToCloseProfit – EA MetaTrader 5

The Expert Advisor to perform global Take Profit for all open positions. It closes all positions, if current positions’ profit exceeds the maximum fixed level in MaxProfit input parameter of the Expert Advisor.

When the condition of exceeding the specified profit is performed on all open positions, the Expert Advisor saves the information about this fact into terminal global variable and only after that on the basis of this information exits all open positions.

Why so and not directly on the signal? The thing is that the process of closing positions requires several time and that is why it can be interrupted in real life due to any reason. In this situation the Expert Advisor closes positions in any situation by the fact of exceeding the surplus. As all positions are closed, terminal global variable will be deleted!

Alternative:  Example of Stochastic Automated - EA MetaTrader 4


📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks