Why doesn't my Limit order execute sometimes even if the price shows on screen?
On the exchange, orders get executed on a ‘first come first serve’ basis. (queue system)
This means that if multiple bids are placed at the exact same price, and there is only one offer to counter it, the execution will happen for the person who placed the bid first.
Exchanges follow a "price-time priority" principle for both orders and quotes. Whenever an order is placed at any exchange, it's given a timestamp which is then used to prioritize your orders.
This method of trading is called Central Limit Order Book or "CLOB" and is used by most exchanges globally. Such a system is necessary to maintain transparency in matching customer orders (bids and offers) on a "price-time priority" basis.
The highest bid will be matched against the lowest offer. The global standard also demands that the best 5 bids/offers be visible to all market participants by way of Snap Quote.
Read this post on TradingQ&A for more information.