  This paper is split in three parts: first we use labelled trade data to
exhibit how market participants accept or not transactions via limit orders as
a function of liquidity imbalance; then we develop a theoretical stochastic
control framework to provide details on how one can exploit his knowledge on
liquidity imbalance to control a limit order. We emphasis the exposure to
adverse selection, of paramount importance for limit orders. For a participant
buying using a limit order: if the price has chances to go down the probability
to be filled is high but it is better to wait a little more before the trade to
obtain a better price. In a third part we show how the added value of
exploiting a knowledge on liquidity imbalance is eroded by latency: being able
to predict future liquidity consuming flows is of less use if you have not
enough time to cancel and reinsert your limit orders. There is thus a rational
for market makers to be as fast as possible as a protection to adverse
selection. Thanks to our optimal framework we can measure the added value of
latency to limit orders placement.
  To authors' knowledge this paper is the first to make the connection between
empirical evidences, a stochastic framework for limit orders including adverse
selection, and the cost of latency. Our work is a first stone to shed light on
the roles of latency and adverse selection for limit order placement, within an
accurate stochastic control framework.
