The supply/demand of a security in the market is an intertemporal, not a static, object and its dynamics is crucial in determining market participants' trading behavior. In this paper, we show that the dynamics of the supply/demand, rather than its static properties, is of critical importance to the optimal trading strategy of a given order. Using a limit-orderbook market, we develop a simple framework to model the dynamics of supply/demand and its impact on execution cost. We show that the optimal execution strategy involves both discrete and continuous trades, not only continuous trades as previous work suggested. The cost savings from the optimal strategy over the simple continuous strategy can be substantial. We also show that the predictions about the optimal trading behavior can have interesting implications on the observed behavior of intraday volume, volatility and prices. * Obizhaeva is from MIT Sloan School of Management,