Orders or positions are open in a symbol and have their Magic Number, but are not attached to any chart.Equity is global for the entire platform.It is best that you put the same Magic Number in both instances of the EA, and thus will close all the orders together.If this causes you conflicts with other EA functionalities, then it would be best to modify the EA. If you do not have enough knowledge to do so, you can ask someone to do it for you in the Freelance section.Regards.
Ok. Maybe this EA can help you. I have not tried it. As I see in the code, it is very simple, does not close pending orders, and you can not choose the pair, but maybe it can help you. If not, I suppose there will be others similar and more complete in CodeBase. Regards.