how is the price calculated from the order book?
Suppose the last trade between customers of the exchange was at $107.
These orders are on the book:
Buy 100 @ $100
Buy .01 @ $106
Sell .01 @ $109
Sell 100 @ $110
The live chart shows a price of $107.
If you want to buy bitcoins, you will be quoted a price of $109. If you buy 10 BTC at market, you will pay $109/BTC for .01 BTC and $110/BTC for the other 9.99 BTC. The live chart will uptick to $110.
OTOH, if you want to sell bitcoins, you will be quoted a price of $106. If you sell 10 BTC at market, you will receive $106/BTC for the first .01 BTC and $100/BTC for the other 9.99 BTC. The live chart will downtick to $100.