Check pending order

Dua Yong Rew  

Hi,

I have this situation where my EA opened a pending order at 1.30330 and I have this function to check if there is any pending order when passing value 1.3033 and its not working

//+------------------------------------------------------------------+
//| Check Pending Orders                                             |
//+------------------------------------------------------------------+
bool CheckPendingOrders(ENUM_ORDER_TYPE type, double price)
  {
//---

   for(int i = OrdersTotal() - 1; i >= 0; i--)
   {
      if(order.SelectByIndex(i) &&
         order.Symbol() == _Symbol &&
         order.Magic() == MagicNum &&
         order.OrderType() == type &&
         order.PriceOpen() == price)
         {
            return(true);
         }
   }

//---
   return(false);
  }

any idea what is wrong although the price I passed is the same as the pending order's price

Dua Yong Rew  
it is a very strange problem because if I add a 1 point to the price, it works well
Reason: