the trailing stop will never be executed, as the last two lines are concurrent types of stop loss and, being the code read and executed sequentially, the last line will always override the previous one.
Your second snippet:
1
2
3
IflongonmarketANDtrailingstopTHEN// Active TrailingStop
Buy1Contract....// Position Size Increasing
ENDIF
has THEN misplaced in the line after IF, while it must be the last keyword in the same line as IF (comments aside). Anyway, the code seems correct, provided you have assigned trailingstop a value other than 0, based on a trailing stop snippet you have placed somewhere in your code.