請選擇 進入手機版 | 繼續訪問電腦版

COCO研究院

 找回密碼
 註冊
搜索
查看: 6836|回復: 11

[求助]兩個不同 DDE 資料源是否是要設定兩個資料庫?

[複製鏈接]
發表於 09-9-20 19:10 | 顯示全部樓層 |閱讀模式
我查了許多資料,但發現到找到的資料描述得似乎不清楚,還望請版上各位大大們協助。

有看過 Blue 大的這一篇:http://www.coco-in.net/viewthread.php?tid=54&extra=page%3D1
大概也瞭解到 DDE 是如何正確的設定。

但現在有個問題,如果說我想要連接 Yeswin 與 eLeader 兩個 DDE 資料源,看起來好像是需要設定兩個資料庫 (Database)?

再來一個問題,若是非得要設成兩個資料庫,那麼,是否就要開啟兩個 AmiBroker 的 instances? 然後個別去開啟所設定的資料庫?

如此的話,這兩個資料庫所接收的資料,有可能可以共用做運算處理嗎?

不好意思,因為 AmiBroker 的觀念對我原先所使用其它交易系統的觀念,似乎來得怪怪些,讓我實在不清楚其中的核心運作邏輯。
 樓主| 發表於 09-9-20 21:50 | 顯示全部樓層
kenming大大
小弟也希望有人能回答這個問題
因為單全都賺本身也有兩個DDE 資料源
blue 發表於 2009-9-20 21:44


哈,本來期望 Blue 大能回答這問題的說。 !^^

我的看法是比較悲觀,應該是要執行多個 AmiBroker instances,然後個別去啟動所創建的 Database 了。
這裡最大的問題是,我不曉得這樣是否這些 Database 之間可否共享資料以做運算處理,我好像找不到官方的文件論及這個 Issue 的。
發表於 09-9-21 09:34 | 顯示全部樓層
您可以寫信去問作者
他們通常一兩天之內都會回

就我所知
一定要開兩個instance才能從兩個dde收資料
兩個instance之間應該不能共享資料
發表於 09-9-21 09:42 | 顯示全部樓層
如果blue和ezbentley來寫台灣第一本AmiBroker教學書,
一定大賣。
發表於 09-9-21 10:06 | 顯示全部樓層
簡單
就把使用手冊翻譯成中文
說真的
他的使用手冊寫的很好
還有其他更難的問題可以去他的yahoo group問
http://finance.groups.yahoo.com/group/amibroker/
發表於 09-9-21 11:17 | 顯示全部樓層
我想的也是,
只要把他的手冊照章節翻成中文然後加圖,
就會是一本很好的書了。

市面上有一本HTS的書,
內容不多,
賣滿貴的。
 樓主| 發表於 09-9-21 17:47 | 顯示全部樓層
您可以寫信去問作者
他們通常一兩天之內都會回

就我所知
一定要開兩個instance才能從兩個dde收資料
兩個instance之間應該不能共享資料
ezbentley 發表於 2009-9-21 09:34


這個就是我最擔心的問題了 :(

在 Tradestation/MultiCharts 的資料源 QuoteManager 這邊來說,則完全沒有這樣的問題存在 (只是 QM 不容易設定罷了)。

你可以透過 QM 連接各種不同類型的 DataSource,然後在 Ts 8.X 內,只要在某一個 Chart 內新增一到多個 Symbol(每個 Symbol 可能對應不同的資料源) ,則可以達成這些 Symbol 之間的共用處理。

AB 啟動多條 Multimple Instance,這實在是相當的 Bad Design! 雖然它的操作介面如此友善又易學。 唉,的確沒有一套軟體可以是十全十美的。 !^^
 樓主| 發表於 09-9-21 20:33 | 顯示全部樓層
反覆來回幾次與 AB 技術支援的電郵詢問後,確定了這一點: 指標或畫圖的資料無法處理來自兩個不同的資料庫!

這是 AB 很大的敗筆,會造成資料處理上的受限。 我也回信希望爾後他們下一版本可以改善這個問題。

底下是 AB 的回信:
There is no direct plugin for TradeStation - so you would need to have
quotes exposed through DDE if you want to use DDE plugin (provided that TS
supports that).

In general - if you want to use 2 separate DDE-based sources (with
different links), then you would need to set-up 2 databases.

Note that if you just want to chart data of 2 different symbols, then one
database should be fine, as AmiBroker DDE configuration allows you to enter
link templates instead of hard-coded entries (so you can use e.g. {ticker}
template, which is then replaced by the actual symbol you call) - read:
http://www.amibroker.com/dde.html

You can't read 2 databases from one instance of AmiBroker - i.e. you can process the databases separately in 2 instances of the program (2 copies of AB running at the same time), but each instance will be independent from the other one.
發表於 09-9-21 22:35 | 顯示全部樓層
謝謝分享!
您辛苦了。
 樓主| 發表於 09-9-21 23:13 | 顯示全部樓層
謝謝分享!
您辛苦了。

小娃 發表於 2009-9-21 22:35


我在想,可能我太吹毛求疵了。 !^^

因為考量到的是國內 DDE Server 的環境,也就是說,如果你要一次連結以個以上的報價源 (日盛, 元大, ...),那麼, for 每一個 DDE Server,一定是要設為不同的資料庫 (因為 DDE 的設定字串不同)。

再來,是否需要同時處理到的資料是來自不同的資料庫? 大概是一個可能,就是容錯 (fault-tolerance)的問題,如果 Broker-A Crash,就馬上轉至 Broker-B 接收資料,繼續維持資料在圖表上的正確性。

不過,這個容錯問題,應該還不至於太需要,除非你是使用自動化的程式交易。 另外一個解決方案就是,自行撰寫 DDE Server,並在其內自行實做連接多個 DDE 報價源。

設定多個資料庫 by 每一個 DDE Server,除了感覺甚怪以外,其實應該也算還好,反正就是 "個別處理" 就是了。

底下也列出 AB 再回覆給我的信,他們認為是沒有這樣的必要去共用資料庫內的資料。
Hello,

What's actually the environment that you will be working that requires you to use separate databases? Are these DDE-sources independent? Or, to put the question into other words - what's the data-format you're going to use?

AmiBroker itself can easily handle even several thousands of symbols in the database (there is no actual max- symbol limit in the AB database) so in most cases there is no need to divide the symbols into separate databases (unless you're using different datasources for those).

發表於 11-3-27 23:03 | 顯示全部樓層
kenming辛苦 推!!雖然還沒用到 XD
發表於 11-3-28 21:33 | 顯示全部樓層
K大的考量是對的,國內情形的確如此
您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則

手機版|Archiver|站長信箱|廣告洽詢|COCO研究院

GMT+8, 24-3-29 22:36

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回復 返回頂部 返回列表
理財討論網站 | AI繪圖AI超擬真美女AI beauty AI Stable DiffusionAI正妹AI Lookbook