Welcome Features News Download Registration Support FAQ Wish list Links
Advanced stock charting and analysis program


AmiBroker Now supports Real-Time streaming quotes from DDE-compliant data sources.

Note: DDE plugin is provided freely on "as-is" basis. No "hand holding" is provided especially with regards to configuring 3rd party applications / 3rd party DDE servers. The information below is everything what is offered. As DDE real-time streaming varies from source to source and each data vendor using its own format / methods / different implementation it may or may not work for you (i.e. for particular data vendor). You can find the sample tested configurations at the end of this page. We do not guarantee the operation for untested sources. It is always way better to find a broker or data vendor that has dedicated plugin available


DDE (Dynamic Data Exchange) is a Windows protocol used to allow applications to exchange data. For example, when you change a form in your database program or a data item in a spreadsheet program, they can be set up to also change these forms or items anywhere they occur in other programs you may use. DDE uses a client/server model in which the application requesting data is considered the client and the application providing data is considered the server.
Thousands of applications use DDE, including Microsoft's Excel, Word, Lotus 1-2-3, and Visual Basic.

For more information about DDE as communication mechanism in Windows please follow this link:


What DDE offers for traders? Basically real time streaming quotes. There is NO BACKFILL via DDE. Many real-time data providers and brokerages provide ability to get real-time data by means of DDE. You should ask your brokerage/real-time data vendor if they offer DDE link. The DDE plugin now available for AmiBroker allows to link to (almost) any DDE source (server) supplying real-time quotes. This makes it attractive option for all data sources that do not have dedicated plugin.


If you are using eSignal, IQFeed, Quote.com, MarketCast, and any other source that has dedicated plugin - you should use this dedicated plugin instead of DDE. This is so because dedicated plugins are ALWAYS better option (provide more features plus they are faster) than generic DDE.


  • user-definable DDE server/topic/item for each field (open, high, low, close, volume, trade size, total volume, bid, bid size, ask, ask size, time)
  • supports upto 500 streaming symbols in real time (version 1.1.0)
  • supports all base time intervals: daily, hourly, 15-,5-,1-minute, 15-,5-second, tick
  • NO BACKFILL (due to the fact that most DDE sources do not provide backfill)


  • 1.2.2 - includes "Time shift" field in the context dialog, stores configuration per-database in dde.config file instead of in the registry plus other small improvements
  • 1.2.1 - fixed problem with 'type mismatch'
  • 1.2.0 - by default plugin uses regional settings numeric format now
    and CPU load is decreased
  • 1.1.0 - symbol limit increased from 40 to 500
  • 1.0.0 - initial release (BETA)


To use DDE data plugin with AmiBroker you need to:
  1. if you have 32-bit AmiBroker installed, download DDE plugin from http://www.amibroker.com/bin/DDE.dll (32 bit version) and copy it to PLUGINS subfolder of AmiBroker directory. Current version of DDE.DLL (32bit): 1.2.1 (Jan 5, 2007)

    if you have 64-bit AmiBroker installed, download
    http://www.amibroker.com/x64/DDE.dll (64 bit version) and copy it to PLUGINS subfolder of AmiBroker directory. Current version of DDE.DLL (64bit): 1.3.0 (Sep 27, 2013)
  2. Enable DDE in the 3rd party software you are using as DDE server (consult data vendor/brokerage software documentation for details on how to enable DDE)
  3. Run AmiBroker and create new database with "DDE universal data plugin" as a data source, following these steps:
  • Run AmiBroker

  • Choose File->New database

  • Type a new folder name (for example: C:\Program Files\AmiBroker\DDE ) and click Create as shown in the picture below:

  • Choose DDE universal data plugin from Data source combo and "Enable" from Local data storage

  • Enter 10000 or more into "Number of bars to load" field

  • Now choose Base time interval. Supported intervals are: EOD, hourly, 15-minute, 5-minute, 1-minute. Professional Edition of AmiBroker allows also to select Tick, 5-second, 15-second intervals.

  • Click CONFIGURE button - IMPORTANT: in the "CONFIGURE" dialog you have to setup all fields following the description of your data vendor. Please check also paragraph below ("CONFIGURING DDE PLUGIN TO WORK WITH YOUR VENDOR") for detailed description. ATTENTION: you can not skip this part - without setting up fields specifically for your data vendor, the DDE WILL NOT WORK.

  • Click OK.

The Plugin status indicator should change from Yellow "WAIT" to Green "OK" within a few seconds.

If it does not turn to "OK" state it means that eiter:

a) server name and/or fields are not set up correctly
b) DDE server (3rd party application) is not running or is not enabled

If indicator shows "OK" - then real time qutoes flow into AB. You can check it by displaying View->Real time quote. Note: since there is no backfill you would need to wait for at least 3 bars of data to be collected before chart shows up.


Various data vendors come use different DDE connection strings, here a few typical exampels will be shown.

Most documentation of DDE uses Excel DDE syntax which looks as follows:


Server is a name of the DDE server such as WINROS, IQLINK, REUTER, CQGPC, MT, MTLink, etc.
Topic is the topic of DDE conversation. Depending on Data source
topic may be just the ticker symbol (like in IQFeed), or the field name (like in winros).
Item is the item of DDE conversation. Depending on data source it can be field name (like in IQFeed) or ticker symbol (like in Winros).

So DDE connection string in two most common standards look as follows:



Now DDE plugin configuration screen looks like this:

In the UPPER part of the dialog you can see "DDE Server" field. In this field you should enter SERVER part of DDE connection string (=SERVER|TOPIC!ITEM)without equation mark and without | character.

Below you can see 12 text entry boxes where you can define DDE topic and item for each data field your data source provides. Here you should enter TOPIC!ITEM pair of the DDE connection string (=SERVER|TOPIC!ITEM)with exlamation mark between DDE topic and DDE item.

As you can see in the picture above, DDE plugin allow you to use a few special strings, namely: {Ticker}, {Field}, {FieldSp}, {Server}, {Id} which are evaluated in run-time for each symbol separately allowing to construct dynamic DDE strings (depending on selected ticker for example) required by most data sources:

{Ticker} - evaluates to ticker symbol of given security
{Field} - evaluates to the corresponding field name (without spaces), i.e. Open, High, Low, Last, LastSize, Volume, Ask, AskSize, Bid, BidSize, Time, Req
{FieldSp} - similar to {field} but 2-word field names have spaces, namely: "Last Size", "Ask Size", "Bid Size"
{Server} - evaluates to server name
{Id} - evaluates to unique ID (running counter incremented by 1 with each symbol)

All other texts are carbon-copied, so if you write for example:

it will evaluate to =SERVER|PREFIX_MSFT_SUFFIX!MYTEXT (provided that current symbol is MSFT)

Next to field definitions we can see what given definition will evaluate to (in Excel notation). This makes it easy to verify if definition is correct. The sample evaluation uses always "MSFT" as a {Ticker}, and 34 as {id}.

If your data source does not provide all fields you can make given field empty. Note that for proper operation the "Last" price (the price of last trade) is required. If your data source does not provide "last" price (most of forex sources don't have "last") you can force DDE plugin to use "Bid" instead. For that you should make "Last" field blank and provide appropriate DDE topic!item pair in "Bid" field. Please also note that Topic!Item pairs should evaluate to unique values.

In the top part of the dialog you can see "Preset" combo-box. As of now it allows to pre-set the fields using two generic schemes:

a) {Field}!{Ticker} - "last price" evaluates to =SERVER|Last!MSFT
b) {Ticker}!{Field} - "last price" evaluates to =SERVER|MSFT!Last

In the future "Preset" box will contain more presets for various DDE source that you submit.


1. Metaquotes/Metatrader 3, DDE docs: http://www.metaquotes.net/metatrader/ug_dde.htm

Following the docs from the vendor the format of DDE requests is MT|{Field}!{Ticker}, where {Field} is one of Bid, Ask, High, Low, Time.

Note that this is Forex source that comes without Last price.

In this case appropriate setup of AmiBroker DDE plugin is as follows:

Metatrader 3 DDE setup
  Definition: Evaluates to:
High: {Field}!{Ticker} =MT|High!EURUSD
Low: {Field}!{Ticker} =MT|Low!EURUSD
Last Size:    
Ask: {Field}!{Ticker} =MT|Ask!EURUSD
Ask Size:    
Bid: {Field}!{Ticker} =MT|Bid!EURUSD
Bid Size:    
Time: {Field}!{Ticker} =MT|Time!EURUSD

Metaquotes/Metatrader Version 4

The difference is that Metatrader DDE server is now called MT4 (not MT)

Following the docs from the vendor the format of DDE requests is MT4|{Field}!{Ticker}, where {Field} is one of Bid, Ask, High, Low, Time.

Note that this is Forex source that comes without Last price.

In this case appropriate setup of AmiBroker DDE plugin is as follows:

Metatrader 4 DDE setup
  Definition: Evaluates to:
High: {Field}!{Ticker} =MT4|High!EURUSD
Low: {Field}!{Ticker} =MT4|Low!EURUSD
Last Size:    
Ask: {Field}!{Ticker} =MT4|Ask!EURUSD
Ask Size:    
Bid: {Field}!{Ticker} =MT4|Bid!EURUSD
Bid Size:    
Time: {Field}!{Ticker} =MT4|Time!EURUSD

2. IQLink

IQLink DDE setup
  Definition: Evaluates to:
Open: {Field}!{Ticker} =IQLink|Open!MSFT
High: {Field}!{Ticker} =IQLink|High!MSFT
Low: {Field}!{Ticker} =IQLink|Low!MSFT
Last: {Field}!{Ticker} =IQLink|Last!MSFT
Last Size:    
Volume: Volume!{Ticker} =IQLink|Volume!MSFT
Ask: {Field}!{Ticker} =IQLink|Ask!MSFT
Ask Size: {Field}!{Ticker} =IQLink|AskSize!MSFT
Bid: {Field}!{Ticker} =IQLink|Bid!MSFT
Bid Size: {Field}!{Ticker} =IQLink|BidSize!MSFT
Time: {Field}!{Ticker} =IQLink|Time!MSFT

3. Dubus TradeXpert (www.dubus.fr)

(screenshot of DDE setup for Tradexpert courtesy of Jean-Guilhem Cailton)

4. FXCM.COM / FXTrek.com - Forex

(screenshot of DDE setup for FXCM courtesy of Byron Porter)

5. Bloomberg DDE

Please note that you need to run Bloomberg DDE server manually as it is not started by default. Bloomberg DDE server can be started manually from Windows Start->Run menu item by typing "BLP.EXE" (without quotes). Once the Bloomberg DDE Server is running you can use the DDE with settings shown below:

(screenshot of DDE setup for Bloomberg DDE courtesy of Paolo Cavatore)


DDE plugin has been tested and it is known to work properly on Windows XP (32 bit DDE) and Windows 9x (16 bit DDE).

The following DDE servers are verified by us to work properly:

  • WINROS (eSignal)
  • MT (Metaquote)

DDE plugin does NOT work with the following DDE servers:

  • VTSPOT (Visual Trader) - due to improper coding in VisualTrader that causes Microsoft DDEML library DdeConnect function to hang on the very first connection attempt

All other DDE servers not listed above should work properly. Contact support at amibroker.com in case of problems.


In order to help the others to configure DDE plugin for their data vendor, once you succeded to link with your particular vendor please drop as a note with a screenshot of the CONFIGURE dialog and name of the source. This will be later included in this document as a reference how to use various data sources. Also working setups will be added to "presets" combo for easy one-click configuration.


1. There is NO BACKFILL in DDE plugin. You can use however ASCII importer (this includes AmiQuote) to import historical data right into the database that you will update later in real time using DDE plugin.

2. Change, % change fields are NOT available (yet)

3. Time and Req fields are now ignored (this may change in the future)

4. The current system time is used to timestamp each tick.

5. When your source does not offer "LAST" price (like several Forex sources) you should make "Last" field EMPTY in the configuration dialog. This will tell the plugin to use "BID" field instead.

6. Plugin status (connected/disconnected) always initially comes up with "Wait" state (Yellow indicator). It means that no DDE conversation has been established. If at least ONE DDE conversation starts successfully it will turn to "OK" state (green indicator). If DDE server was not running at first attempt to connect, the plugin wil NOT attempt to reconnect automatically. Instead you should force reconnection manually (see point 7). The indicator may turn to "Disconnected" (red indicator) only in two cases:

 a) you were connected properly but DDE server (3rd party app) has been closed

 b) you selected "shutdown" from plugin status menu

7. You can reconnect at any time by selecting "reconnect" from plugin status menu.


About | Privacy | Terms of Use | Contact information
Copyright © 2004 AMIBROKER.COM