if you place a buy limit order at $51 before the stock market opens, and the first tick is $50.50, are you guaranteed to get it at $50.50?
No. Nothing is ever guaranteed in the markets. Imagine the scenario. There is 1 seller at 50.50 and 3 sellers at 51 and 5 sellers at 53 (theres a gap there for some reason ) You have a buy order at 51 but 6 other orders or even just one large enough to absorb all the available sellers is in front of yours in the queue. They fill. Price gaps to 53. You sit and wonder if you were too greedy or if you did the right thing and shouldnt chase price. Make sense?
What you guys are talking about? The first tick (opening price) was at $50.50, implying that all market orders and limit orders up to $50.50 accepted by exchange had crossed at that price. You get fill at opening price 100% in this case.
But do that the definition of "in front of you" means at least: at the same price but earlier in time at the same market center or at the same price but at a different market center which matches where the contra-liquidity is available or at a higher price (any market center, assuming it's a Reg NMS protected security).