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