You make some variables, oldx, newx, oldy, newy, and set newx,y to current x,y every tick.
Then if newx is greater than oldx you know its going right, less left, newy >oldy, down, etc.
If newx, or newy is different to oldx, or oldy, you set oldx to newx, and oldy to newy.
Or, use a dummy for the graphic so that you can use the angle.