Order Class

Defines the structure for an object that represents an order.  

Namespace: tsdata.trading

Properties

   Additional properties, methods, and events are described in the classes listed under Inheritance Hierarchy (see below).

  Name Type Description
Public property AccountID string Gets the ID of the account.
Public property Action enum Gets the type of order action.  See OrderAction for a list of possible values.
Public property ActivationRules object Gets an activation rule for the order ticket. See ActivationRules.
Public property AdvanceOptions string Gets a string contained the advanced order settings.
Public property AllOrNone bool True to allow the order only if the entire quantity can be placed.
Public property AvgFilledPrice double Gets the average filled price for the current order.
Public property BuyMinusSellPlus bool True to allow buys to occur only on downticks and sells only on upticks.
Public property Child int Gets the child order with the specified index in an OCO/OSO order.
Public property ChildCount int Gets the number of children in an OCO/OSO order.
Public property Commission double Gets the commission paid in an order.
Public property Discretionary bool True to show an order's bid/ask at a lower/higher price than you are willing to pay.
Public property DiscretionaryAmount double Sets or gets the discretionary price increment used when Discretionary is true.
Public property Duration string Gets the duration of the order.
Public property Duration Date datetime Gets the duration date for GTD.
Public property ECNSweep bool True to route orders to ECNs only, bypassing all market makers.
Public property EnteredQuantity int Gets the quantity of shares or contracts requested for the order.
Public property EnteredTime datetime Gets the time when the order is placed.
Public property ExtendedProperties object Gets the DynamicProperties object associated with the Order.
Public property FilledQuantity int Gets the quantity of shares or contracts filled for the order.
Public property FilledTime datetime Gets the time when the order is filled.
Public property FirstSibling object Gets first Order object in the collection of sibling Orders. Note that all orders have at least one sibling, namely the order itself.
Public property GeneratingApplication enum Get the type of application that generated the Order. See GeneratingApplication for a list of possible values.
Public property HasValue bool True when specified field contains a value. False if no value.
Public property IfTouched bool True to specify a trigger event at which an order will be sent.
Public property IfTouchedPrice double The trigger price at which an IfTouched order is sent.
Public property IfTouchedPriceOffset int The IfTouched price offset value if using an 'auto' limit price style.
Public property IfTouchedPriceStyle enum The IfTouched price style. See PriceStyle for a list of possible values.
Public property LastSibling object Gets last Order object in the collection of sibling Orders. Note that all orders have at least one sibling, namely the order itself.
Public property LeftQuantity int Gets the number of unfilled shares  or contracts for the current order.
Public property LegCount int Gets the number of Legs in an options spread order.
Public property Leg[ index ] object Gets the Leg with the specified index from the collection of the legs in an options spread order.
Public property LimitPrice double Gets the limit price for a limit or stop limit order.
Public property LimitPriceOffset int Gets the limit price offset value if using an 'auto' limit price style for limit and stop limit orders.
Public property LimitPriceStyle string Gets the name of the limit price style for limit and stop limit orders.
Public property LotSize int Gets the size of the lot. Applicable only to forex orders.
Public property NextSibling object Gets the next Order object in the collection of sibling Orders, if one exists; otherwise null. Note that all orders have at least one sibling, namely the order itself.
Public property NonDisplay bool True if the current order is to be placed with the non-display option. See Placing Non-Display Orders in TradeStation Platform Help.
Public property OCOGroupID string Gets the group name of the OCO group.
Public property OSOParentID string Gets the ID of the order that triggers the current order.
Public property OrderID string Gets the ID of the current order.
Public property OrderName string An optional, user-specified name for the order. Order names may not exceed 15 characters.
Public property Originator string Gets the account name that generates the order.
Public property Parent order Gets the parent order of the current order.
Public property Peg enum The enumeration for peg behavior. See PegBehavior for a list of possible values.
Public property PreviousSibling object Gets the previous Order object in the collection of sibling Orders, if one exists; otherwise null. Note that all orders have at least one sibling, namely the order itself.
Public property Route string Gets the route for the order.
Public property ShowOnly bool True to place show only orders.
Public property ShowOnlyQuantity int Gets the size of a show only order. See show only in TradeStation platform help.
Public property SiblingCount int Gets the number of siblings in an OCO/OSO order.
Public property SpreadName string Gets the spread name in an options order.
Public property State enum Gets the order state value.  See OrderState for a list of possible values.
Public property StateDetail enum Gets the order state detail value.  See Order StateDetail for a list of possible values.
Public property StopPrice double Gets the stop price for a stop or stop limit order.
Public property StopPriceOffset int Gets the stop price offset value if using an 'auto' limit price style for stop and stop limit orders.
Public property StopPriceStyle string Gets the name of the stop price style for stop and stop limit orders.
Public property Symbol string Gets the symbol to trade.
Public property SymbolExtension string Gets the symbol extension for the Symbol to trade.
Public property TopLeftOrder order Gets the top most and left most node in an OCO/OSO order.
Public property TrailingStop enum Gets the trailing stop type.  See TrailingStopBehavior for a list of possible values.
Public property TrailingStopAmount double Gets the trailing stop value.
Public property Type enum Get the order type.  See OrderType for a list of possible values.
Public property Value double Gets the value of the specified OrderField.
Methods
  Name Description
Public property ActionToString(action) Gets a string representing a specified OrderAction.
Public property CanCancel True if the Order can be canceled, otherwise False.
Public property Cancel True to cancel the Order, otherwise False.
Public property Replace(replaceTicket) Replaces the current Order with a new ReplaceTicket object. Returns true if the replacement Order was sent, otherwise False if replacement is not possible.  Note that there may be cases when the original Order is filled before the replacement becomes active.
Public property StateToString(state) Gets a string representing the state of the order based on a specified OrderState.
Public property TypeToString() Gets a string representing the order type based on a specified OrderType.
Events
  Name Description
 Public event Updated Occurs whenever the object is updated. See OrderUpdatedEventArgs for the properties returned by the handler's args parameter.