Many exchanges use an auction mechanism to prevent this from happening. When a trade is made that is more than x% different from the previous trade, the security goes into "auction mode" for a period of time. During this period all the bids and offers are taken, but only at the end of the auction, using an "uncrossing" algorithm, is a fair price determined for the security. The auction can of course also be manipulated, but you'll need a lot more money to influence the price.