EasyLanguage Object Reference

OrdersProvider Class (Component)

The OrdersProvider allows access to updated order information based on user specified filters from a list of specified TradeStation accounts. This information is similar to that found on the Orders tab of the TradeManager. The Order class describes the properties available for a specific order.

Typically, you will use the Toolbox to add a component to your EasyLanguage document.  Click and drag the name OrdersProvider into your document from the Toolbox.  The name of the provider appears in the component tray at the bottom of your document.  By default, the name is followed by a number to identify multiple instances of the component.  

Open the Properties editor and locate the From, To, Accounts, Symbols, States, and Orders properties under "Filters". By default, these fields are blank; all order objects will be in the collection.  Entries in any or all of these fields filter the order objects included in the collection. A comma delimited list of dates, account numbers, symbols, states or order numbers  (eg. "SIM12345, SIM67890") specifies that only those listed are to be a part of the Orders collection queried by the OrdersProvider.  

To reference property values for a specific order object in EasyLanguage code, use OrdersProvider1 followed by a 'dot operator' and the orders provider property name. Available order properties included inherited properties will appear in the autocomplete list as soon as you type the 'dot' after ordersprovider1. properties are also listed under Order class in the dictionary and help. To get data for one of the field names entered in the Properties editor, use the “Order” property, followed by the field name within square brackets and double quotes[“field name”] or a numeric index (zero-based) that represents an Orders object within the provider orders collection.

Value1=OrdersProvider1.Order[0].Commission;          // gets the commission of first order [0] in the collection.

or

Value1=OrdersProvider1.Order["2-3105-2140"].LimitPrice;   // gets the Limit Price of a specific order id number.

  The provider can only access orders that are associated with the current TradeStation logon.

For general information about providers, refer to Provider Classes.

Namespace: tsdata.trading

[ Expand All ]
Properties
  Name Type Description
Public property Accounts list Specifies the list of accounts you want to query for orders. 
Public property Count int The number of available orders based on the filter criteria.
Public property Data object Object containing orders based on the filter criteria.
Public property From datetime Specifies the first date for the date range filter.
Public property Order[index] object Gets the Order object associated with the specified index.
Public property Order[orderID] object Gets the Order object based on the specified OrderID string.
Public property Orders list Specifies the filter list of orders to include in the collection.
Public property States list Specifies the order states filter list.
Public property Symbols list Specifies the symbols filter list.
Public property To datetime Specifies the last date for the date range filter.

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

Events
  Name Description
 Public event Updated Occurs whenever the OrdersProvider object is updated. See OrderUpdatedEventArgs for the properties returned by the handler's args parameters.
Methods
  Name Description
Public property Create Initializes a new instance of the class.
Example

The following RadarScreen example uses an OrdersProvider to display updated order status information for any symbol row for which you have an order.  By default, this example shows orders from all accounts, symbols, states.  

Import Example

OrdersProvider indicator for RadarScreen

  1. Click on the Import Example link to import the example into TradeStation.   
  2. Go to the TradeStation platform and create a RadarScreen window containing symbols with positions.  Use the Insert - Indicator menu sequence and Add !ex_OrdersProvider to the RadarScreen window at the selected column location.
  3. To review or modify the example code, go to the TS Development Environment and open indicator!ex_OrdersProvider in the EasyLanguage Editor.
Inheritance Hierarchy

elsystem.Object

  elsystem.ElComponent

    tsdata.DataProvider

      tsdata.trading.OrdersProvider