crunchor 發表於 13-9-3 12:10

你有冇看"程式交易:方法與實務應用"? 我想買但是有問題...

書內有沒有programming example, 例如Java, .NET (VB, C#)?

alexliou 發表於 13-9-3 12:43

有附很多VBA程式碼

crunchor 發表於 13-9-3 14:19

alexliou 發表於 13-9-3 12:43 static/image/common/back.gif
有附很多VBA程式碼

vba 是用excel做database, 比較用vb, c#, java直接在excel或sql拿data出來不同吧!? vba又會一行一行寫result到excel...又用result那一行再計下一行result...好不同!?

rockwell 發表於 13-9-3 14:47

crunchor 發表於 13-9-3 14:19 static/image/common/back.gif
vba 是用excel做database, 比較用vb, c#, java直接在excel或sql拿data出來不同吧!? vba又會一行一行寫res ...

雖然還沒有買,但作者大概提及這一本跟前一本主要的差別是多了與券商API的連結,
與一些小部分內容的增刪,詳細目錄可以到網路書局看看,
所以應該還是維持大部分都是用VBA來寫程式交易的內容。

最基本的理由是:
1.Excel幾乎每個人都有
2.VBA好讀易懂又好寫
3.VBA要跨入VB.NET陣痛少
4.Excel的儲存格不錯用



所以要自建程式交易,這本書算是首選。

但是若是程式功力高深者,或許只要稍微看看如何自建程式交易的架構,
再自行以自己熟悉的語言下去撰寫程式交易,或許是比較好的方式。

若是JAVA的愛用者,倒是可以參考http://www.coco-in.net/forum-140-1.html,
PHILIPZ大,也有分享使用JAVA自建的程式交易機器人,
所有的CODE也都是公開的,可以自行取用。

alexliou 發表於 13-9-3 15:38

y9

本帖最後由 alexliou 於 13-9-3 15:57 編輯

crunchor 發表於 13-9-3 14:19 static/image/common/back.gif
vba 是用excel做database, 比較用vb, c#, java直接在excel或sql拿data出來不同吧!? vba又會一行一行寫res ...
VBA (Visual Basic for Applications)基本上就是VB的語法
它可以存取許多種不同的database, 如accessor SQL等
當然它也可以把EXCEL的表格當database

在MS OFFICE 的各項軟體中
最常和VBA一起使用的就是EXCEL

該書作者使用EXCEL VBA作為使用者自建系統的開發工具

crunchor 發表於 13-9-3 17:37

alexliou 發表於 13-9-3 15:38 static/image/common/back.gif
VBA (Visual Basic for Applications)基本上就是VB的語法
它可以存取許多種不同的database, 如accessor...

yes I understand, just using excel as database seem like having very different structure in the program coding. Is that instead of writing a temporary result in a new excel column, I put the result in a new array? Then I use this temporary array "column" to do more calculation like how vba does in excel?

crunchor 發表於 13-9-4 12:26

rockwell 發表於 13-9-3 14:47 static/image/common/back.gif
雖然還沒有買,但作者大概提及這一本跟前一本主要的差別是多了與券商API的連結,
與一些小部分內容的增刪 ...

PHILIPZ is very great!

alexliou 發表於 13-9-4 14:14

本帖最後由 alexliou 於 13-9-4 14:16 編輯

crunchor 發表於 13-9-3 17:37 static/image/common/back.gif
yes I understand, just using excel as database seem like having very different structure in the pr ...
Actually the author dose not use excel sheet as a database, he uses excell sheets as output interface to make users easily see the results. In most of the his examples, the input data is read from a text file into arrays. All intermediate results are stored in user-defined variables rather than cells in the excell sheets.

A stub of codes from that book is attached below for your reference.

Dim i As Single, j As Single
Dim Min_Bar(1000, 6) As Variant 'Time, O,H,L.C,V
Dim O As Single
Dim H As Single
Dim L As Single
Dim C As Single
Dim V As Single
Dim NP As Single
Sub 關閉DDE自動交易系統()
    On Error Resume Next
    Application.OnTime Now + TimeValue("00:00:02"), "ThisWorkBook.ExeSelf", , False
End Sub
Sub 啟動DDE自動交易系統()
    Dim k As Single
    j = 2
    Application.OnTime TimeValue("08:45:00"), "ExeSelf"
    'Call ExeSelf
End Sub
Private Sub ExeSelf()
    On Error Resume Next
    i = i + 1
    If i = 58 Then ' i = 60
      Sheets(2).Cells(j, 1) = Time
      Sheets(2).Cells(j, 2) = O
      Sheets(2).Cells(j, 3) = H
      Sheets(2).Cells(j, 4) = L
      Sheets(2).Cells(j, 5) = C
      Sheets(2).Cells(j, 6)
.........

crunchor 發表於 13-9-4 15:05

alexliou 發表於 13-9-4 14:14 static/image/common/back.gif
Actually the author dose not use excel sheet as a database, he uses excell sheets as output interfa ...

very cool and thx for showing me the codes. Do you use Java to trade now? Do you think this book is helpful to learn? I am from Hong Kong and it is so sad that we can only use Interactive Broker over here to have API, all local brokerages don't have API, this is like stone age comparing to Taiwan or USA.

crunchor 發表於 13-9-7 18:37

有冇其他好書介紹?
頁: [1]
查看完整版本: 你有冇看"程式交易:方法與實務應用"? 我想買但是有問題...