Bit stuck here. I wish to shut the commerce then get profit/loss of this trade only closed--and then add this to my previous TpAmount. . Could I only do something like this ?

if(OrderType()==OP_BUY)
ticket=OrderClose(OrderTicket(),OrderLots(),Normal izeDouble(Bid,Digits),3,clrBlue);
TpAmount =(OrderProfit);