EA OrderModify Take Profit

 
I'm having a problem in my hedge EA and would like someone to help me.
When an order reaches SELLSTOP or BUYSTOP (hedge), the EA needs to remove the Take Profit of the first order.
Thank you
 

Furlansa, you need to code the following logic into your EA (all of which has been explained frequently, with code samples, in the forum if you care to search):

- Loop through the pool of current orders, selecting each one.

- Check each order you have selected to see whether it is "in your scope" ie. belonging to your EA, the current trading day, current symbol, matching magic number, the "first" order as you put it etc.

- Modify the "in scope" order you have selected to have a take profit of zero, with all other parameters unchanged.

CB