MarketDepthProvider Class (Component)

The MarketDepthProvider allows access to updated market depth data for a specified list of quote fields for a symbol. The Updated event is called whenever a change occurs in the market depth data.

Typically, you will use the Toolbox to add a component to your EasyLanguage document. Click and drag the name MarketDepthProvider 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.

To reference a property value for a market depth provider object in EasyLanguage code, use MarketDepthProvde1 followed by a 'dot operator', and the property name. Available market depth provider properties, including inherited properties, will appear in the Autocomplete list. For example, use the “Asks” property, followed by a 'dot operator' and the "Quotes" property. Finally, add a 'dot operator' and select the information property you are requesting.  

Value1=MarketDeptProvide1.Asks.Quote.Depth        // gets the market Depth for a specific symbol.

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
AggregateQuotes bool True to include all quotes at the same price level as a combined quote, otherwise false.
AskLevels object Gets the AggregateMarketQuotes with the market side of Ask.
Asks object Gets the MarketQuotes with the market side of Ask.
BidLevels object Gets the AggregateMarketQuotes with the market side of Bid.
Bids object Gets the MarketQuotes with the market side of Bid.
Books list Gets and sets the list of ECN books.
Data object Gets market Level II MarketDepth data.
IncludeECNBooks bool True to include the ECN books, otherwise false.
IncludeMarketDepth bool True to include Level II data in the market depth data, otherwise false.
MaximumLevelCount int Gets the maximum number of market depth levels in the collection.
Participants object Gets the MarketParticipants.
Symbol string Gets and sets the symbol for which the market depth data is to be provided.
Methods
  Name Description
Public property Create Initializes a new instance of the class.
Events
  Name Description
 Public event Updated Occurs whenever the object is updated. See marketdepthupdatedeventargs for the properties returned by the handler's args parameter.

 

Example

The following RadarScreen example uses an MarketDepthProvider to display the bid-ask level information.  

Import Example

MarketDepthProvider 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_MarketLevels 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_MarketLevels in the EasyLanguage Editor.