NewsProvider Class (Component)

The NewsProvider class is used to retrieve news stories from entitled news service providers using categories and sources offered by each individual provider. Provider settings can be changed and customized to your personal preference, and is based on account entitlement. The Updated event is called whenever a change occurs in the reference data.

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

Open the Properties editor and locate the FilterType pull-down under "Filters." Select whether you wish to filter news feeds by symbol, keyword, or no filter ("all"). Enter comma delimited lists of symbols or keywords(eg. "AAPL, MSFT"), to specify the values that will be filtered from the NewsProvider.

To reference a property value for a news provider object in EasyLanguage code, use NewsProvider1 followed by a 'dot operator', and the property name. Available NewsProvider properties, including inherited properties, will appear in the Autocomplete list.

Value1=NewsProvider1.News.Count];   // gets the number of news items currently in the News 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
Public property Data object Gets the collection of news items. See News.
Public property DaysBack int Gets or sets the number of days back to get news data. This property may be set in the Properties panel.
Public property FilterType object Sets or gets the type of filter used from the NewsFilterType enumerated list. This property may be set in the Properties panel.
Public property From object Gets or sets the beginning point of a range to accept news data. This property may be set in the Properties panel. See To property to close the range.
Public property HistoryType object Sets or gets the type of history ("days back" or "range" used from the HistoryType enumerated list. This property may be set in the Properties panel. Range is set using the From and To properties.
Public property Keywords string Gets or sets a comma-delimited list of filter keywords.
Public property News object Gets the collection of news items. See News.
Public property Providers object Gets the collection of news providers. See NewsFeeds.
Public property ProvidersFilter string Gets or sets a comma-delimited list of filter keywords used to filter the Providers collection.
Public property Symbol string Gets or sets a comma-delimited list of filter symbols.
Public property To object Gets or sets the ending point of a range to accept news data. This property may be set in the Properties panel. See From property to begin the range.
Methods
  Name Description
Public property Create Initializes a new instance of the NewsProvider class.
Public property getAvailableProviders Returns the collection of available news providers from NewsFeeds.
Public property getNews Returns the collection of available news items from News.
Events
  Name Description
 Public event Updated Occurs whenever a News object is updated. See NewsUpdatedEventArgs for the properties returned by the handler's args parameter.