DDE Link for Spreadsheets

Dynamic Data Exchange (DDE) is a communication process that permits applications to share data. Barchart Trader allows you to connect any quoteboard using DDE to either Microsoft Excel, OpenOffice Calc, or LibreOffice Calc and auto-update the spreadsheet as Barchart Trader gets new data.

DDE is available only on Windows installations, and only from a Quoteboard or a Fixed Quoteboard.

Spreadsheets and Macros

In order to use DDE, your spreadsheet needs to allow macros to be executed. This is typically a security setting found under Tools, or may be a setting you are asked to enable when starting the DDE connection.

If using OpenOffice Calc, you must manually enable Visual Basic macros.

  1. Start OpenOffice Calc.
  2. Choose Tools > Options > Load/Save > VBA Properties
  3. Enable the Executable code checkbox.

 

Start a DDE Connection

  1. Open a Quoteboard or a Fixed Quoteboard and place it on your workspace.
  2. Click the | Action menu, found in the top right corner of the quoteboard, select Export Quoteboard, then select with Excel (DDE) or OpenOffice (DDE).

    Result: The Quoteboard is saved as an .xls file (Excel) or .ods file (OpenOffice) on your computer. The dialog shows you the location of the file and allows your to either open the location/folder where the file was placed, open the file, or dismiss the dialog by pressing OK:

    Export Complete

The Worksheet

The file can now be opened with your spreadsheet software.

Important: Barchart Trader must be open for the spreadsheet to receive updates.

If you've opened the spreadsheet before opening the application, or to restart the DDE connection, click the Refresh All button at the top of the spreadsheet.

Excel Spreadsheet

The worksheet will be populated with new data from Barchart Trader. If desired, you may add or change symbols on the spreadsheet.

Add a Symbol

  1. Position your cursor in an open cell in the Symbol column.
  2. Enter the desired symbol.
    Result: The spreadsheet automatically pulls in the remaining data columns and will continue to update using data from the application. The symbol is NOT added to the quoteboard in Barchart Trader.

    Add a Symbol

Change a Symbol

  1. Position your cursor in the cell containing the Symbol you wish to change.
  2. Enter the desired symbol.
    Result: The spreadsheet automatically pulls in the data for the new symbol. The symbol is NOT added to the quoteboard in Barchart Trader.

Formatting Your Spreadsheet

Once data is imported to the spreadsheet, it may be necessary to format the cells to receive the type of data being retrieved via DDE. For example, price fields may need to be formatted with the proper decimal places or commas and time fields may need to be formatted as HH:MM:SS.

Underlying Formulas

DDE places a formula in each cell in the worksheet so the appropriate data can be pulled from the application. If desired, you can enter these formulas in new cells to pull in data that was not on the original quoteboard in the application.

Excel Formula =Trader|Quotes![Symbol].[Field]
Examples:

  • =Trader|Quotes!AAPL.last
  • =Trader|Quotes!'ZW*0.previous'

OpenOffice/LibreOffice Formula=DDE("Trader";"Quotes";"Symbol.Field")
        or =DDE("Trader";"Quotes";CONCATENATE($A5;".Field"))
where A5 = the column/row containing the symbol

Examples:

  • =DDE("Trader";"Quotes";"AAPL.last")
  • =DDE("Trader";"Quotes";"ZW*0.previous")
  • =DDE("Trader";"Quotes";CONCATENATE($A23;".volume"))

Available Quote Fields

Available Quote Fields Description
contract Displays the full futures contract. If the symbol is ZW*0, the contract would return, for example, ZWK15
last Last Price
open Open Price
high High Price (current session)
low Low Price (current session)
previous Previous Settle Price
volume Volume (current session)
change Price Change
changeper Percent Change
lastsize
last_size
Size of the Last Trade
bid Bid Price
bidsize
bid_size
Bid Size
bid_both Bid x Size
ask Ask Price
asksize
ask_size
Ask Size
ask_both Ask x Size
exchange Exchange
month
month_year
The expiration month and year
name Symbol name
expiration
exp_date
Expiration date (futures)
time
short_time
Time stamp for the last bid/ask
tradetime
trade_time
Time stamp for the last trade
settle Settle Price (current session)
prevsettle Previous Session Settle Price
issettled
is_settled
Yes / No to indicate if settled
vwap Volume Weighted Average Price
oi
open_interest
Open Interest