Moving Robot with C++ relative to Feature

Hey Folks,

I´m currently struggling with my Script which I have written in C++. I´m trying to create a generic script with MoveL commands. My problem is that when I change the Z variable for example that is looks like the robot moves in regard to the basis and not the feature that I created/ relative to the tcp.
What lines of code do I have to implement ?

Thanks in advance