Question: A customer asked how a TradeStation EasyLanguage Strategy can be set to send both a profit target and stop orders of an open position, to TradeStation servers.

Answer: They can’t both be placed with TradeStation EasyLanguage Strategies. Here’s my IM to the customer: “Strategies place limit order immediately. But as soon as it has a stop order which is closer, and stops are being sent to the servers, it pulls the limit order and places the stop. Both aren’t in the market at the same time. Strategies do not use OCO-bracket relationships. Strategies manage this on the user’s machine via the ‘strategy engine’.”

What you can do, as covered in the IM, is send Strategy orders directly to the TradeStation Order Execution Network. That way, if your machine goes offline and price was closer to your stop than target at the time, your stop will be in effect. Here is a picture of the Strategy dialog for setting the stop order handling feature. 

Alternatively, you can use RunCommand in EasyLanguage to issue PlaceOrder macro instructions. This way you can send real OCO brackets. There are caveats to this approach, but they are well worth learning if you wish to trade with Bracket orders systematically at TradeStation.

Regards,

David O’Dell