What kind of trailing stop? moving average, ATR, percent, breakout,etc, etc. You need to define your "trailing stop" buy!
Also, if you find some exit short code that says for example...if condition xxx then exitshort...
You can usually modify it and write something like "if condition xxx...