A pending order is canceled, if at the time the order was triggered you did not hold enough free margin to place the trade.