Strategy Built-In Stop Reserved Words

EasyLanguage includes built-in stops that generate exit orders within your strategies. These specialized reserved words are designed to be active on the same bar as the entry of entry; that is, they are evaluated intra-bar and not only on the close of the bar. They generate both long and short exit orders depending on the current position.

Each of these built-in stops has one or more input parameters that set the stop or profit target amounts. There are three reserved word switches that can change the behavior of the built-in stop commands so that the exit order amount is calculated either on a per share or per contract basis,or on a total position basis.

For details, refer to the EasyLanguage Reserved Word & Functions help in the TradeStation Development Environment.

The built-in stop calculation switches are:

SetStopPosition - exit amount is calculated for the entire position. This is the default if not specifically set.

setstopshare or SetStopContractSetStopContract - exit amount is calculated per share or contract.

 

The built-in stop commands are:

SetBreakEven - sets an exit stop at the entry price, after a minimum profit is achieved.

SetExitOnClose - exits at the close of the session.

SetDollarTrailing - sets an exit stop a fixed number of dollars away from the peak profit.

SetPercentTrailing - sets an exit stop a fixed percent of the peak profit away from the peak profit, after a minimum profit is achieved.

SetProfitTarget - sets an exit order at a fixed dollar profit target.

SetStopLoss - sets a stop loss order at a fixed dollar risk from entry.