Help with code snippet?
-
Dear all,
Thanks for your time looking at this. I want to achieve the following, hope someone can help me with it.
Scenario:
I have an account that is running multiple EAs on it.Now, what I want to achieve: when a certain profit is hit on the account, any one of the EA can trigger to close all positions currently on the account (yes the other EAs coded by me). I am using different Magic Numbers for the other EAs.
I have tried using this method but, it doesn't close the positions by the other EAs.

I guess, this is achievable with a code snippet instead?
Any leads/advice is much appreciated.
Thanks for your time again!
-
This should close all running trades, is it not closing or instantly re-opening?
-
@jstap It only closes the trades that the EA opened and the manual ones. But it's not closing the other trades that other EAs opened.
Thanks again!
-
Everything you have put there should cause all trades to close
-
@jstap Thanks again... I'll double check my codes again...
-
If you add a shared link I will have a look
-
@jacque82
Your setting only close trades of the same chart symbol.