QuotesProvider Class (Component)

The QuotesProvider allows access to updated information from the quotes data stream for a specified list of quote fields for a symbol. The Updated event is called whenever a change occurs in the quotes data.

Typically, you will use the Toolbox to add a component to your EasyLanguage document. Click and drag the name QuotesProvider 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 Symbol and Fields properties under "Filters". Both are required fields. A comma delimited list of fields (eg. "AskSize, DailyLimit"), specifies the values that will be available from the QuotesProvider.

To reference a property value for a quotes provider object in EasyLanguage code, use QuotesProvider1 followed by a 'dot operator', and the property name. Available quotes provider properties, including inherited properties, will appear in the Autocomplete list. To get data for one of the field names entered in the Properties editor, use the “Quote” property, followed by the field name within square brackets and double quotes[“field name”]. Add a second ‘dot operator’ and the type of the value to be returned.

Value1=QuotesProvider1.Quote["ask"].DoubleValue; // gets the Ask price for a specific symbol. Type MUST be known before using this.

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
Public property Count int Gets the number of available quotes in the provider collection.
Public property Data object Gets the Quotes data object.
Public property Fields list Gets and sets the TokenList of names that represent quote fields that may be accessed in the provider collection.  See QuoteFields for a list of names.
Public property Quote[index] object Gets the Quote object with the specified index position within the Fields list.
Public property Quote[name] object Gets the Quote object with the specified name included in the Fields list. See QuoteFields for a list of available names.
Public property Symbol string Gets and sets the symbol for which quotes are to be provided.
Methods
  Name Description
Public property Contains(QuoteFieldName) True if the quote with the specified field name exists in the collection.
Public property Contains(QuoteObj) True if the specified quote object exists in the collection.
Public property Create() Initializes a new instance of the QuotesProvider class.
Events
  Name Description
 Public event Updated Occurs when the requested quote field's value is updated. See QuoteUpdatedEventArgs for the properties provided to the event handler when this event fires.
Example

The following RadarScreen example uses a QuotesProvider to display the ratio between each symbol and a reference symbol.  

Import Example

QuotesProvider 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.  Use the Insert - Indicator menu sequence and Add !ex_QuotesProv to the RadarScreen window at the selected column location.
  3. To review of modify the example code, go to the TS Development Environment and open indicator!ex_QuotesProv in the EasyLanguage Editor.