We study numerically the evolution of the degree order and mobility of the vortex lattice under steady and oscillating applied forces. We show that the oscillatory motion of vortices can favor an ordered structure, even when the motion of the vortices is plastic when the same force is applied in a constant way. Our results relate the spatial order of the vortex lattice with its mobility and they are in agreement with recent experiments. We predict that, in oscillating applied forces, the lattice orients with a principal axis perpendicular to the direction of motion.