MT3 Close Order Problem

 
I'm calling MtCloseOrder to close orders via the MT3 API. 95% of the time it works absolutely fine, however some times (it seems like when the market is moving faster than normal), the function seems to absolutely refuse to work. It will always return error 3 : RET_INVALID_DATA. A few times the market hasn't even changed price, and yet it still says this, only to have the FX server close the order at the same price 30 seconds - 1 minute later (based on a stop). And other times my program will attempt to close an order this way for over 30 minutes, repeatedly, and is never able to close an order (same error 3 -- invalid data).

Meanwhile, other orders, on different currencies, close fine.

I don't think the problem is that I'm sending it the wrong price value, after all, it works 90% of the time, and my program always retrieves the current price immediately before closing an order. What could be causing these sporadic and seemingly random failures?

Is there any other way to close an order aside from MtCloseOrder? And since the documentation doesn't specify, what exactly does the function want for the 'price' parameter (I assumed it was the closing price of the order, which must match current market price).