How to make OrderModify ?

 
Hi, i want to asked, is this ordermodify for TP is correct? why sometimes it mod, and some times it doesn't mod?

if (PosB20()==2 && PosB20_Mode(OP_BUY)==2){
for (int ModB20=0;ModB20<OrdersTotal();ModB2 0++){
OrderSelect(ModB20,SELECT_BY_POS);
if (OrderMagicNumber()==Magic_Number_B +20){
OrderModify(OrderTicket(),OrderOpen Price(),OrderStopLoss(),OrderOpenPr ice()+ModTakeProfit*Point,0,Blue);
return(0);
}}}
if (PosS20()==2 && PosS20_Mode(OP_SELL)==2){
for (int ModS20=0;ModS20<OrdersTotal();ModS2 0++){
OrderSelect(ModB20,SELECT_BY_POS);
if (OrderMagicNumber()==Magic_Number_S +20){
OrderModify(OrderTicket(),OrderOpen Price(),OrderStopLoss(),OrderOpenPr ice()-ModTakeProfit*Point,0,Red);
return(0);
}}}

Thanks for your help