You cannot measure the absolute speeds of the stars, but you can measure their relative speeds along the line of sight, because if a star is moving toward us its light is shifted to shorter wave lengths, and if it is moving away from us its light is shifted to longer wave lengths.

Joel Primack