You can either use a different algo for entering and exiting, or use adviseLong for entering and adviseShort for exiting the position.