Error Code 1

 
Can anyone help me please.
I am trying to code a decision of whether or not to place a pending buy or stop at the level of a previously placed oredr based on the modification of the stop loss from zero on that order.
basically the code is:

result = modify the order
if result is false then display a failed modify message (expecting to try again on next tick)
else if result = true then place stop order at the order price of the modified order.

unfortunately sometimes the result = false and the error code is 1 (no error, but result is unkown) the modify then completes and the pending order is never placed as the stop loss has been applied and SL <> 0.

Alternatively can someone please explain why I get the error code 1 and how to avoid or code around it to overcome the problem.
Thanks
BigAl
 
"MQL4: Execution errors"

ERR_NO_RESULT 1 OrderModify attempts to replace the values already set with the same values. One or more values must be changed, then modification attempt can be repeated.
 
Ok I work on this and see what I can do
Thanks
BigAl