We show how to switch on and off the ratchet potential of a collective Brownian motor, depending only on the position of the particles, in order to attain a current higher than or at least equal to that induced by any periodic flashing. Maximization of instant velocity turns out to be the optimal protocol for one particle but is nevertheless defeated by a periodic switching when a sufficiently large ensemble of particles is considered. The protocol presented in this letter, although not the optimal one, yields approximately the same current as the optimal protocol for one particle and as the optimal periodic switching for an infinite number of them.