Stop, Takeprofit and Trail are described on the manual, but also in much better detail in the broker's introduction to trading. Every broker has such an introductory tutorial, and that is probably the best way to lean how a stop loss, profit target, and trail distance works.
For moving an existing stop or profit target to a different price, use the exitLong/Short functions - look at the example under "Tips & Tricks".