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

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
When an order reaches SELLSTOP or BUYSTOP (hedge), the EA needs to remove the Take Profit of the first order.
Thank you