AB可以用excel當資料源嗎?
TS可以用excel當資料源來設定metaserver(TS程式交易全攻略P44~P52),請問單用excel的方式可以設定AB嗎? 本帖最後由 good88 於 10-5-30 10:35 PM 編輯
應該解決了,出現CONN,{:4_87:}{:4_149:}{:4_164:}
新增一組database,把設定的dde存入excel,給個檔名例"master.xls",放入amibroker,
server 設excel,
DDE設成master.xls!R2C2,
"R2C2"請參考TS程式交易全攻略P44~P52,
這是可以利用EXCEL的方式,把許多券商的DDE源用EXCEL收集,防止某一DDE源斷線,造成K棒不完整....
很籠統的分享,自己體驗吧! There are 2 ways to collect data into AB from Excel. You either
define a single cell eg. "R2C2" for cell B2 to collect data from, or
use the method mentioned in a previous post a few days ago where you
use a text symbol and define the name of each cell in Excel.
Firstly , to use the "text" symbol method for an Excel Workbook named
"Master.xls" using a sheet name of "Data"...
In "Database Settings" > "Configure" each field to be collected from
"Data" would have the entry "Data{ticker}_"field"
So.."DDE server" enter "EXCEL"
"Open" enter "Data{ticker}_Open"
"Last" enter "Data{ticker}_Last"
"Volume" enter "Data{ticker}_Volume" etc. for the various
data cells you have in the "Data" sheet. Follow AB's naming protocol
exactly. No using "Vol" for "Volume".
Due to a limitation in the "Naming" of cells in Excel the fields
"Last Size, Ask Size and Bid Size" will not work as Excel will not
accept a name with a space.
The secret to get this to actually work is to enter in the "Req*"
field..."Data{ticker}". If you don't have this it won't
link. This field entry will establish the link in any vacant cell
apart from "Time" and you can actually combine the Single cell
reference such as "R2C2" with text Symbol entries.
Eg. the "R2C2" symbol will come up as a bid if "
Data{ticker}" is entered for the Bid Field definition, regardless of
the other "_field" definitions entered as above at the same time for
"Configure DDE plugin". That is, the two protocols can be combined.
If you are only using AB to act as a database for any sort of live
data in Excel...this could apply to scientific data mapping for
instance, as well as trading data or custom calculations in Excel...
then a cell entry only requires the field to have the entry "[MASTER.
xls]Data{ticker}."
This can be placed in "Last", "Open", "Low" or whatever apart from
the "Time or "Req*" fields.
As mentioned in the previous post, if you are using the "text" symbol
method each cell in Excel must have it's "Name" defined. The actual
position of the cell in the sheet in not significant as such, but in
the interest of good housekeeping an orderly arrangement of columns
is preferable, obviously.
So, repeating the earlier post to name the cell...
Click on the cell>Insert>Name>Define>Add
The cell for "High" for symbol "ABC" would be defined as "ABC_High",
for "Last" "ABC_Last". When the cell is clicked on this name will
come up in the name box in Excel, rather than the cell no. if you have
done it properly. Spaces in the name are not accepted.
I hope this info is useful. More than a few hours of trial and error
have got me this far with DDE. AB can actually be a very powerful DDE
database. 回復good88
卷商軟體有提供DDE的話
不需要經過EXCEL
BG 發表於 10-5-30 08:43 PM http://www.coco-in.net/images/common/back.gif
BG大.請教一下
AmiBroker 是不是能將想法轉成程式碼?
若是,哪些期貨商的下單軟體可以支援 AB 轉出的程式碼成為自動下單機?
拍誰~ 又打擾你...{:4_186:} BG大.請教一下
AmiBroker 是不是能將想法轉成程式碼?
若是,哪些期貨商的下單軟體可以支援 AB 轉出的程 ...
tentium989 發表於 10-5-31 03:50 PM http://www.coco-in.net/images/common/back.gif
不好意思,我還在搞基礎建設,和抓一些現成的程式來跑...
站內有一些這方面的高手和資料,請他們幫你解決吧! 那篇英文的回覆我看不懂,現在我的excel已經建好了許多商品的報價,要如何讓AB認識並連結這些商品的報價呢?
頁:
[1]