Error modify BUY/SELL order: 4202
Well i can spot 2 problems, but from your post it's unclear what the problem is you want solved.
if(OrderType()==OP_BUY){ if(TS>0){ if(Bid-OrderOpenPrice()>Point*(TS*places)){ if((OrderStopLoss()< (Bid-Point*(TS*places))) || (OrderStopLoss()==0)){ bool modi=OrderModify(OrderTicket(),OrderOpenPrice(),Bid-Point*(TS*places),0,0,Green); return(0);// you are returning here so not every open order will be updated -> use continue } } if (!modi){//this will never execute since you're returning Print("Error modify BUY order : ",GetLastError()); return(0); } } }hth
Error 4202 is related to Objects... It has nothing to do with OrderModify().
| ERR_OBJECT_DOES_NOT_EXIST | 4202 | Object does not exist. |
Yes, but if I delete this code then there is no error. I think problem is in this code because Print (...) is there and says "Error modify..."
Yes, but if I delete this code then there is no error. I think problem is in this code because Print (...) is there and says "Error modify..."
Hello!
Can anyone tell me where is the problem? Thanks!