To (partially) close a position with opposite direction you need a netting account. On hedge you need to use CloseBy.
Closing a position with a limit order exposes you to the risk of not getting filled.
To (partially) close a position with opposite direction you need a netting account. On hedge you need to use CloseBy.
Closing a position with a limit order exposes you to the risk of not getting filled.
Thank you for your answer.
I found a solution at my problem:
- I open 2 orders Buy (for example with 0.01 each lot) with 2 Take Profit differents: the first TP correspond at my first close (partial) and the second TP correspond at the second close.
What happens to OnTradeTransaction, when a partial order is filled ? I mean, how does it receive the information on that kind of situation ?
Thanks in advance

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
For my EA, I try to close an order with 2 partial close but without success.
I would like to send two OP_SELLLIMIT to close a BUY order (with specifics volume and price for each sell limit order), how to proceed?
The problem is the ticket number of my BUY order, my sell limit order must have the same ticket number than my BUY order, how to send a sell limit order with the same BUY ticket number?
I don't want to use OrderClose() to close my BUY order but sell limit orders.
Thank you for your help.