close a certain trade when its Profit reaches same number of pips as its Stoploss?
-
let suppose EA opens up Multiple Trades across multiple different pairs and now i want it to close the trades which have the same pips profit as its stoploss .....
Is this the right way to do it :

-
@zackry This is how I would do it, but I guess that if you are asking it here you didn't make it, right?

-
@l-andorrà yep its not working for some reason , are you positive this is the correct implementation ?
-
-
i would maybe use a variable in that block that identifies the # of pips.
-
@jsauter86 i dont think it will work since it wont take individual trades into consideration
-
@zackry Did you check it and it doesn't work? Then I want an answer to your question too.
-
yes i have tried and it doesnt work like i indented it to ,let say there are 4 trades open and only one of those trades (first trade) is at the same pips profit as its sl , so as per my understanding it should close only the first trade , but it seems to be closing all 4 trades
-
I think you need to use the Close Trade block from the purple Loop for Trades and Orders menu and not the blue one from the Trading Actions. The purple Close Trade block closes only the trade in the current loop. I haven't checked this, but it is certainly worth a try.
-
@cpbonzo you are right , i missed that block before , thanks