When you open a position, you can create a PositionSettings object, and set the TrailingStop
properties. This will cause the trailing stop to be created once the position is opened. If you would like to create or modify the trailing stop for an existing position, you can use the PositionManager.SetTrailingStop
method. For example, to set a trailing stop of $1 on an existing position, you would use PositionManager.SetTrailingStop(pos.ID, 1, TargetPriceType.Price); The trailing stop type can also be Percentage instead of price, but your broker may or may not support that if you are trading live.
Let us know if you need more help or a more detailed example.