Advanced stock charting and analysis program
|
|
DDE DATA PLUGIN
WHAT IS DDE 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. For more information
about DDE as communication mechanism in Windows please follow this
link: DDE FOR TRADERS 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. WHEN NOT TO USE DDE 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. DDE PLUGIN FEATURES SUMMARY
HISTORY
INSTRUCTIONS To use DDE data plugin with AmiBroker you need to:
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 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. CONFIGURING DDE PLUGIN TO WORK WITH YOUR VENDOR 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|TOPIC!ITEM
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 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. a) {Field}!{Ticker} - "last price" evaluates to =SERVER|Last!MSFT In the future "Preset" box will contain more presets for various DDE source that you submit. A FEW EXAMPLES: 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:
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:
2. IQLink
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 (screenshot of DDE setup for Bloomberg DDE courtesy of Paolo Cavatore) TEST PLATFORMS 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:
DDE plugin does NOT work with the following DDE servers:
HELP US TO HELP THE OTHERS: 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. NOTES ON DDE PLUGIN: 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.
|
Copyright © 2004 AMIBROKER.COM |