This paper develops a model in which patterns in buy and sell volume, order imbalances and expected price changes arise endogenously. The model covers cases where the market maker is competitive and where he is a monopolist. Our results provide an explanation for the existence of patterns in mean returns within the trading day and across trading days.