I guess you need to store the coordinations on Tap and on release.
Then compare them both to determin whether it's going left/right/up/down.
On tap: Store Touch.X in locale variable InitialX
Store Touch.Y in locale variable InitialY
On release: Store Touch.X in locale variable ReleaseX
Store Touch.Y in locale variable ReleaseY
If Initial.X<Release.X: go to right
etc.
You might want to compare the difference of initial X and release X with the Y difference to prevent from going up while you are clearly going to the right. It is hard to touch and release on the same Y coordinate, vise versa with X.
gl!