How do I make the end of a trail transparent without knowing the speed part with the trail?

Is there a way so that I can make the back of a trail transparent constant a crossed any speed the part with it is moving?