.PlaceOrder Command

Places an order using a macro command or with RunCommandOnLastBar from EasyLanguage.

Syntax:

.PlaceOrder "< parameter='keyword' >, < parameter=number >... ,< parameter='string' > "

Parameter Options

A value shown below in italics represents a user specified character string, number, or macro name. All non-italic character values are keywords (i.e. Buy, False, Day+, etc). In addition, it is required that character strings, macro names, and keyword values be enclosed in single quotes.  

Advanced Parameters

The .PlaceOrder parameters have been expanded as of TradeStation 8.5. See .PlaceOrder Advanced Parameters for more details.

Parameter Value (Italicized string values are used with 'single quotes')
<account> String
<action> Buy, Sell, SellShort, BuyToCover, BuyToOpen, SellToOpen, SellToClose, BuyToClose
<ActivationPrices> String
<AllOrNone> True, False
<BuyMinusSellPlus> True, False
<Discretionary> Number, 0 {represents False}
<Duration> Day, Day+, GTC, GTC+, GTD, GTD+, IOC, FOK, OPG, CLO, 1 Min, 3 Min, 5 Min
<ECNSweep> True, False
<GTDDate> String ('MM/DD/YY' date format)
<IfTouched> Number, 0 {represents False}
<LimitPrice> Number
<MustBeUnique> True, False
<NonDisplay> True, False
<OCOBracketName> String
<OCOGroupName String
<OrderEntryMacro> Order Entry Macro Name
<OrderName> String{limited to 15 characters}
<OrderType> Market, Limit, Stop Market, Stop Limit
<OSOTriggerBy> String{Reference the OrderName of an existing open order}
<Peg> True, False
<Quantity> Number
<QuantityType> Shares, Currency
<Route> Intelligent, AMEX, ARCX, AUTO, BATS, CDRG, EDGA, EDGX, Knight Link, NITE, NQBX, NSDQ, NYSE
<ShowOnly> Number, 0 {represents False}
<Stage> True, False
<StartTime> String{hh:mm:ss AM/PM}
<StopPrice> Number
<Symbol> String
<SymbolCategory> Equity, Future, EquityOption, IndexOption
<TrailingAmount> Number, 0 {represents False}
<TrailingType> pts, pct, minmove

Example:

Calling from a Command Line Macro:

.PlaceOrder "Action='Buy', Symbol='MSFT', SymbolCategory='Equity', OrderType='Limit', LimitPrice=25.00, Quantity=500, Duration='Day', Account='12345' "

Calling from EasyLanguage:

An example of using the .PlaceOrder command may be found in the EasyLanguage PlaceOrder (Function) described in the EasyLanguage Reserved Words & Functions help. Order specific functions that call the PlaceOrder function are also described in the EasyLanguage help.  

For example, the LimitOrder function call in EasyLanguage executes the same order as the .PlaceOrder command line macro above. Extra parameters in the function place the order just once for a Day duration.

Value1 = LimitOrder("Once","12345","Buy","Equity","MSFT",100,"Day","",25.00);

It is required that character strings, macro names, and keyword values be enclosed in single quotes.