The following examples show you how to set up RTD links with live data in Microsoft Excel.

However, in most cases it is easier to simply use the action Copy as RTD link (available in the views Overview and Constituents) to create a live RTD link. An RTD link for the displayed symbol or a list of symbols is created automatically. The RTD links can then be inserted into a Microsoft Excel Table with the function Insert or with the key combination Ctrl + V.

If you want to use historical data in your spreadsheet, or a combination of historical and current data (for example, the last 10 ticks of a symbol), you have to use another type of RTD link: See Setting up an RTD Link with Historical Data.

To request live quote data manually in Microsoft Excel (example)

▪       Open a Microsoft Excel spreadsheet.

▪       In the cell where you want the data field to appear, type (or copy) the following formula:

=RTD("ProfRTD";;"Live";"{949843},Last")

▪       The requested data will appear in the Microsoft Excel cell. The request above will for example fetch the Last price of the EURUSD currency pair.

Syntax for RTD links to live quote data

In your Microsoft Excel spreadsheet, certain formulas are used to create the RTD links. If you use the Copy as RTD link command, all RTD links are created automatically for you. If you set up the links manually, you have to use the following syntax to request live quote data:

=RTD("ProfRTD";;"Live";"<Symbol>,<Field>")

Note             The character you have to use for separating the different arguments of the RTD function (shown as a semicolon ; above) depends on the regional configuration of your operating system. Under Windows, you can change this configuration in the Control Panel

Symbol

Internal identification of the symbol. You can either use the symbol identification number (for example {829802} ) or its unique name (for example MSFT_0FSPC).

The symbol identification number can be obtained by using the command Copy as RTD link in the TeleTrader WebStation.

You can also use the Lookup command to search for a symbol ID within Excel (see Searching for TeleTrader Symbols).

Field(s)

Name of the data field(s) that should be retrieved. The name is equal to the heading of the corresponding column in the Professional price page.

Market Depth Fields

For market depth data, the following fields can be used – the number in square brackets signifies the depth level, starting with 0:

MDBidSize[depth_level]         For example, MDBidSize[2] for the third depth level

MDBidCount[depth_level]

MDBid[depth_level]

MDAsk[depth_level]

MDAskCount[depth_level]

MDAskSize[depth_level]

VWAP Fields

When retrieving data from a calculated VWAP column, the following data field syntax is used:

VWAP(Type,DateTimeF,DateTimeT,VolF,VolT,PriceF,PriceT)[OutputName]

Type                        Time period used for VWAP calculations: This can be D (Daily), LH (Last Hour), C (Custom), N (None) or F (Freeze).

DateTimeF/T        Begin and end date and time of a custom time period (C) in ISO format YYYY-MM-DDThh:mm:ss

VolF/T                    Lower and upper boundaries for the volume range (optional)

PriceF/T               Lower and upper boundaries for the price range (optional)

OutputName          Defines the VWAP value that should be returned: Price, StdDev, TotalVol, AvgVol, NumTicks, DateF, DateT, TimeF, TimeT, VolF, VolT, PriceF, PriceT

Examples for retrieving VWAP data:

=RTD("ProfRTD";;"Live";"{459237},VWAP(LH)[StdDev]"

=RTD("ProfRTD";;"Live";"{459237},VWAP(C,2010-04-08T22:00:00,2010-04-09T10:00:00,0,100000,40.00,45.00)[Price]'

Tips and examples

Retrieve live quotes for the EURUSD currency pair:

=RTD("ProfRTD";;"Live";"{949843},Last")

In RTD formulas, you can use references to other cells, which makes your formulas reusable – for example, you can substitute the symbol name with a cell reference (the correct symbol ID should be entered manually into the referenced cell A1):

=RTD("ProfRTD";;"Live";A1&",<Field>")

You can also use Excel formulas to for example convert GMT time to your local time. The first line shows an RTD formula that should be entered to cell B1 of your spreadsheet and retrieves GMT time for the Dow Jones Industrial Average  – the second line should be entered to any other cell and converts the GMT time of cell B1 to your local time zone:

=RTD("ProfRTD";;"Live";"{394917},TIME")

=B1+"02:00:00"

For more ease-of-use when typing a lot of RTD formulas manually, you can define a wrapper function using Microsoft Visual Basic/VBA. The following example shows the wrapper function GetData:

Function GetData(SymbolField)

     GetData = Application.WorksheetFunction.RTD("ProfRTD", Null, "Live", SymbolField)

End Function

You can then use the function GetData instead of RTD formulas in your worksheets using the following syntax:

=GetData("<Symbol>,<Field>")

 

=GetData("{949843},Last")