TimeAndSalesProvider Class (Component)

The TimeAndSalesProvider allows access to the same data that can be displayed the Time & Sales window in the TradeStation platform. You request data for any combination of Bid, Ask, and Trade ticks for a symbol across a defined range of dates and times or number of ticks back. The Time & Sales provider supports data for stocks, stock options, indexes, index options, forex, futures, futures options, and funds as either real-time or historical data.

Typically, you will use the Toolbox to add a component to your EasyLanguage document. Click and drag the name TimeAndSalesProvider 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 truncated and followed by a number to identify multiple instances of the component.

Open the Properties editor and locate the Symbol property. This is a required field and needs to be set to the desired symbol for which you want to report time and sales data.

To reference a property value for a time and sales provider object in EasyLanguage code, use TimeAndSalesProvd1 followed by a 'dot operator', and the property name. For example, to access the price of the first tick in the Time & Sales Provider data collection, use the following:

myPrice = TimeAndSalesProvid1.Items[0].Price;        // get the Price of the first item (zero-based) in the T & S provider's data collection.

For general information about providers, refer to Provider Classes.

Namespace: tsdata.marketdata

Properties

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

  Name Type Description
ApplyCorrections bool True to automatically apply data corrections. Default is True.
Asks bool True to include active trading Asks data. Default is false.
Bids bool True to include active trading Bids data. Default is false.
Data object Gets the collection of filtered Level I market data. See TimeAndSalesItem for more information about tick values that may be accessed.
DataFilterType enum Gets or sets the filter type to be applied to the Data collection. See TimeAndSalesDataFilterType for a list of possible values. The default is 300 ticks within the current day.
Day datetime Gets or sets a DateTime object indicating the desired date for which data should be obtained.
From datetime Gets or sets a DateTime object indicating the time that the period of included data should start.
MaximumItems int Gets or sets the maximum number of items that may be returned in the Data collection.
MinutesBack int Gets or sets the starting point (minutes ago) of a period of data acquisition ending with the current tick.
Symbol string Gets and sets the symbol for which the Time & Sales data is to be provided.
TicksBack int Gets or sets the starting point (ticks ago) of a period of data acquisition ending with the current tick.
To object Gets or sets a DateTime object indicating the time that data should end.
TradeOptions enum Gets or sets the category of trades reported by the provider. See TimeAndSalesTradeOptions for a list of possible values.
Trades bool True to include all trades (maximum 9,999). Default is true.
Methods
  Name Description
Public property Create() Initializes a new instance of the class.
Events
  Name Description
 Public event Updated Occurs whenever the provider object is updated. See TimeAndSalesUpdatedEventArgs for the properties returned by the handler's args parameter.