One position has two deals, how to close one of them?

 

as topic

Thanks 

 
forest_z:

as topic

Thanks 

Close part of the position.
 
forest_z:

as topic

Thanks 

Open only one position and close part of it with ordermodify()....
 
hmrt135:
Open only one position and close part of it with ordermodify()....

Really ?  there is no OrderModify() in mql5,  there is in the Ctrade classes but that does not close part of the position.

Isn't the correct way just to OrderSend() an opposite trade for the position size that is to be closed ? 

 
forest_z:

as topic

Thanks 

if you are referring to closing them individually then no ways to do that. The price is averaged.

to close partially, send an opposite direction to partial close. 

 
doshur:

if you are referring to closing them individually then no ways to do that. The price is averaged.

to close partially, send an opposite direction to partial close. 

thank you
 
forest_z:
thank you
Close with lot size of the one trade you want to close. i.e. if trade 1 was 0.1 lots and trade 2 was 0.2 lots so the position would be 0.3 lots. To close trade 1 you close 0.1 lots from the position or 0.2 lots from the position for trade 2.
 
tonny:
Close with lot size of the one trade you want to close. i.e. if trade 1 was 0.1 lots and trade 2 was 0.2 lots so the position would be 0.3 lots. To close trade 1 you close 0.1 lots from the position or 0.2 lots from the position for trade 2.

hi, I've the same problem. which is the command to close 0.2 lots of a long position made of 0.5 lots (just example numbers)

should be something like this? 

.PositionOpen(_Symbol,ORDER_TYPE_SELL,0.2,
                           now_bid,STOPLOSS,TAKEPROFIT,"Test Sell");

 thanks.