How to Group Close Trade
-
I have simple EA that I want it to close Buy and Sell trades separately base on profit...
For Example: I have 3 buy trades and 5 Sell trades, all sell trades are on loses and the Buy trades are on profit, I want the EA to close only the buy once the sum of the profit of the buy trades is $10 . Or like the Image Bello
I need help please ...

-
Further Example: lets say I have 4 buy trades which are all on loses the sum of the loses for buy is $-30
I also have 3 Sell trades running on profit, I want the EA to close all the sell trades once sum of all the trades is greater than $10...
I have tried all my effort but I could not..
I will be happy if someone can bailed me out... -
@luckybest Hi in this picture you'll see how to do this and how to use flags to stop the condition from being true, a combination of this should do all you need.
link url) -
@luckybest Manual close one trade and will close all. Must be in "On Trade"

-
@luckybest Why closing the sell trades only when the overall profit id 10? Shouldn't all buy trades be closed too? You got a final profit for all open trades after all. Why keeping the losing trades open?
-
@jstap Thanks a lot, it works,
God Bless you all contributed -
@luckybest You are welcome