EA - Close Opposite Order

 

Hi,

I am trading several pairs and on each pair I have two orders.

How can I close the opposite one if one of these two is triggered?

Do I have to crawl thrue the Order-Pool and get the Order-ID and close it?

Is there a simple way to do that?

Thank you in advance!

Kind regards,

John

 
Can you give a more detail or an example?
 
Ickyrus:
Can you give a more detail or an example?


Hi Ickyrus,

I am trading 10 pairs at the same time.

On each pair I set in the morning two orders, one buy and one sell.

I need to write an EA that will close the opposite order for each pair if one of those 2 (on each pair) is triggered.

So that I have only one active order on each pair if one of the 2 orders (that was set in the morning) was triggered.

So I have 20 orders in the morning, and want to have only 10 active in the end, if everyone of them was triggered.

I hope this makes more sense now, thanks for help! =)

kr, John

 
 

Thank you ubzen - this is what I was searching for: One-Cancels-the-Other !