Code for Trailing Stop Loss

Hi,

I need to code Trailing SL (without BO) in Java API . Can someone please guide me on this?

Thanks