Using trader-resolved data, we bring to light lead-lag activity networks between groups of investors in the foreign exchange market at an hourly time scale. Because these relationships are systematic and persistent, they allow order flow prediction. We thus propose a generic method to exploit trader lead-lag and predict the sign of the total order imbalance over a given time horizon. It first consists in an unsupervised clustering of investors according to their buy/sell/inactivity synchronization. The collective actions of these groups and their lagged values are given as inputs to machine learning methods. When groups of traders and when their lead-lag relationships are sufficiently persistent, highly successful out-of-sample order flow sign predictions are obtained.