Coding for Ami Broker

How to code a Exit for Buy and Short Trade in Ami Broker…

Specify the conditions for the exit buy.

Specify the conditions for the exit buy?