ADVFN DDE Interface
Introduction
The ADVFN DDE Interface is a program that allows you to import streaming data from your ADVFN service directly into other programs, such as Microsoft Excel. DDE (Dynamic Data Exchange) is a protocol that allows programs to share data and send commands directly to each other. The ADVFN DDE Interface gives you the ability to use Excel's charting and data manipulation facilities to customise and create your own analysis.
How to install the ADVFN DDE Interface
In order to use the ADVFN DDE system, you will need to download the client onto your computer, as this is the application that creates the link between the site and your Excel spreadsheet. You can obtain it directly from ADVFN:
Download ADVFN DDE Installer
It is important to obtain it only directly from our servers, to ensure the program is correct. Once downloaded, please run this file, and follow the on-screen prompts to install it.
How to use ADVFN DDE
To start to use the ADVFN DDE Interface, you must create your spreadsheet before enabling the program. Open Microsoft Excel or other DDE-compatible program and start a new sheet.
In each cell, you can create a formula, which states what data it wants to pull from the DDE Interface. The format for this data is:
In Microsoft Office: =ADVFN|Exchange_Stock!Information
In Sun OpenOffice: =DDE("ADVFN";"Exchange_Stock";"Information")
For example:
=ADVFN|LSE_VOD!CHANGE
=DDE("ADVFN";"LSE_VOD";"CHANGE")
subscribes to the change percentage (e.g. -1.2%) for VOD on the LSE exchange.
The first part of the formula always contains ADVFN
This is to denote that it is data from the ADVFN DDE interface.
The second part of the formula is the Exchange and stock that you are after. You can find a full list of the supported exchanges in the Glossary section of this document.
In the example we have used LSE as the exchange, and Vodafone as the stock. The exchange and symbol must be separated by an underscore (“_”) character. The symbol for the stock must be used here, not the stock's full name (i.e. VOD rather than Vodafone PLC), this can be obtained from the ADVFN website. The stock symbol must be followed by an exclamation mark (!) as a separator before the final part.
The final part of the formula indicates which type of information you are after, for instance “Change” for the change percentage. You can find the full list of information types in the Glossary section of this document.
You can of course use any Excel formulas to manipulate the data, summing cell contents with one another for instance, using the ADVFN DDE commands the same as any other resource within the program.
Once you have created and saved your list, close your spreadsheet program, then start the ADVFNDDE.exe program. You will be asked to login at this point. Your login details are the same username and password that you use to login on the ADVFN website. You will see the ADVFN logo in the systems tray when the DDE application is running. Open up the Excel sheet and press update on the pop up to get all the latest prices.
When it is running, it should look something like this:
Download a ready-to-use spreadsheet.
Troubleshooting
I get a lot of stocks displaying “N/A”
It is likely you have entered the code in the cell incorrectly, please double check that. If all your cells display “N/A”, it is also possible there has been a connection error. To reset the system, close your spreadsheet, then close the connection to the ADVFN DDE Interface, by right-clicking the ADVFN logo in your system tray and selecting “Exit”. You can then restart the ADVFN DDE Interface, followed by your spreadsheet.
If this does not solve your problem, please send an email to below detailing the problem, and including your spreadsheet as an XLS or CSV file if possible.
help@advfn.com
Glossary
Command format summary
The format for inserting data into cells is:
In Microsoft Office: =ADVFN|Exchange_Stock!Information
In Sun OpenOffice: =DDE("ADVFN";"Exchange_Stock";"Information")
For example:
=ADVFN|LSE_VOD!CHANGE
=DDE("ADVFN";"LSE_VOD";"CHANGE")
ADVFN Exchange codes
This is a list of the codes to use for each of the exchanges in the ADVFN DDE Interface.
AMEX |
American Stock Exchange |
BIT |
Italian Stock Exchange |
BITMOT |
Italian Stock Exchange MOT |
BMF |
BM&F - Brazilian Commodities |
BOV |
Brazil Bovespa Exchange |
CME |
Chicago Mercantile Exchange |
DBI |
Deutsche Boerse Indices |
DOWI |
Dow Jones Indices |
EU |
Euronext |
FTSE |
FTSE Indices |
FX |
Forex |
LSE |
London Stock Exchange |
NASDAQ |
NASDAQ |
NYSE |
New York Stock Exchange |
OTCBB |
OTCBB |
TSX |
Toronto Stock Exchange |
TSXV |
TSX Venture Exchange |
Note: Other markets codes may also work, and this isn't the definite list. You can try out various codes, or call/email the support team who will help you find the market codes you need.
help@advfn.com
ADVFN DDE Commands
This is a list of all the different commands you can use to obtain data from the DDE Interface.
AUCTION_TIME | Time that an auction started for this stock. Will not be present for all markets. |
BID | Time that an auction started for this stock. Will not be present for all markets. |
BUY_PC | Buy volume expressed as a percentage of the total volume. |
BUY_VOLUME | Total number of shares traded at a price which was closest to the offer at the time of trading. |
CHANGE | Difference between the current price and the closing price from yesterday. |
CHANGE_PC | Difference between the current price and the closing price from yesterday, expressed as a percentage. |
CLOSE | Official closing price for a stock (also known as the settlement price). |
CUR | Current price. This is usually either the last trade price, or the mid price (market dependent). |
DAILY_VWAP | Volume weighted average price for the day. Will not be present for all markets. |
DESCRIPTION | Stock description. |
FLAGS | Exchange flags for this stock. |
HIGH | Highest value of the current price. |
ISIN | International Securities Identification Number. |
LAST_CHANGE_TIME | Last time the current price has changed. |
LAST_TRADE_FLAGS | Flags for the last trade. |
LAST_TRADE_SIZE | Size of the last trade. |
LAST_TRADE_TIME | Time of the last trade. |
LAST_TRADE_TYPE | Type of the last trade. |
LOW | Lowest value of the current price. |
MARKET | Market for the stock. |
MID | Average of the bid and offer prices. |
NAME | Name of the stock. |
NUM_TRADES | Number of trades reported today. |
OFFER | Offer price (also known as the 'ask' price). |
OFFER_SIZE | Number of shares quotes for at the offer price. Will not be present for all markets. |
OPEN | Opening current price of the day. |
OPEN_CHANE_PC | Difference between the open price and the current price, expressed as a percentage. |
OPEN_CHANGE | Difference between the open price and the current price. |
OPEN_INTEREST | Open interest for derivatives. Will not be present for all markets. |
PERIOD_VWAP | Volume weighted average price for the day for an exchange defined period. Will not be present for all stocks. |
SELL_PC | Sell volume expressed as a percentage of the total volume. |
SELL_VOLUME | Total number of shares traded at a price which was closest to the bid at the time of trading. |
SPREAD | Difference between the bid and offer prices. |
SPREAD_PC | Difference between the bid and offer prices, expressed as a percentage. |
SYMBOL | Stock symbol. |
TRADE_HIGH | Highest traded price |
TRADE_LOW | Lowest trades price. |
TRADE_PRICE_0 | Most recent trade price. |
TRADE_PRICE_1 | Second to last trade price. |
TRADE_PRICE_2 | Third to last trade price. |
TRADE_PRICE_3 | Fourth to last trade price. |
TRADE_PRICE_4 | Fifth to last trade price. |
UNCROSSING_PRICE | Resulting price of an auction. Will not be present for all markets. |
UNCROSSING_VOLUME | Resulting volume for an auction. Will not be present for all markets. |
UNKNOWN_PC | Unknown volume expressed as a percentage of the total volume. |
UNKNOWN_VOLUME | Total number of shares traded at a price which was the mid price, or the trade report was delayed. |
VOLUME | Total volume traded today. Which trades count towards this total are exchange dependent. |
YEST_BID | Yesterday's bid price. |
YEST_CLOSE | Yesterday's closing price. |
YEST_OFFER | Yesterday's offer price. |
YEST_VOLUME | Yesterday's volume. |