I was wondering how market depth data is useful if the orders which change the price would not be available . If we consider the orders which change the price , these are the orders where the bid on one side and the ask on the other are executed. i this is the case , then market depth would show orders which cannot execute and dont change the stock price.
The "price" of something is a historical value, i.e. it's the price at which the last trade happened, in the past. The information in the order book, together with the size and direction of incoming orders are what will determine the prices of the next trades. That's what you're really interested in.
Here's a toy example: Suppose the best bid is at 100, but only for 50 units and then the bids at 99 total 50 units, too and then the bids at 98 are lots of units. And suppose you need to send a market order to sell 100 units. So you will probably end up selling 50 of them at 100, and then 50 more of them at 99. Two things: 1) To know the prices at which your order was likely to execute, you needed to know more than the best bid. If you sent a larger market order to sell, you'd need to know more depth on the bid side to understand the likely execution of the order. And 2) Immediately after the order has executed (but, for the purpose of the example, before any other bids arrive), what is the best bid? Well it's been pushed down to 98 or lower. The more I know about the depth, the more I know where the price will go in the face of aggressive sell orders.
This is related to the idea of "microprice" (I think there's even "milliprice" nowadays but I don't know what it means). Some notions of microprice use info from deeper in the book to produce a weighted average of bid and ask that are different from the midprice. The weight is a decreasing function of the volume on the bid/ask sides because the thinking is that if there is more volume on the bid side, then the price is likely to go up, so we should weight the 'ask' value more heavily in our price estimate.