想請問一下如果要寫一個簡單的測試功能
小弟剛接觸程式交易,很多地方不懂幾個問題想要請教一下?1想請問一下如果要寫一個簡單的測試功能:例如:5分鐘移動平均線穿越10分鐘移動平均線就買進一口多單要這麼寫呢?
2MC有辦法去做選擇權的下單嗎?
3市面上有什麼書是比較推薦的?
麻煩大家
謝謝!! 回復 1# michael1215
我不清楚你的easylang水平,所以用最簡單的syntax幫你。
1想請問一下如果要寫一個簡單的測試功能:例如:5分鐘移動平均線穿越10分鐘移動平均線就買進一口多單要這麼寫呢?
有兩個做法:
(A) 只開一個五分鐘圖,計算兩bar的合併後的open, high, low, close.概念是(不是完整的程式):
open_10min = open;
If high > high then high_10min = high else high_10min = high;
If low < low then low_10min = low else low_10min = low;
close_10min = close;
好處是只開一個五分鐘圖,但syntax較繁複。
(B) 開一個五分鐘圖和一個十分鐘圖。概念是(不是完整的程式):
Inputs: length_10min(50), length_5min(100);
If Average(Close of data2, length_10min) < Average(Close, length_5min)
And Average(Close of data2, length_10min) > Average(Close, length_5min) then
Buy next bar at market;
2MC有辦法去做選擇權的下單嗎?
insert > signal > "choose your strategy" > properties > Auto Trading > Require order confirmation
3市面上有什麼書是比較推薦的?
想學EasyLanguage可考慮到tradestation.com買。
想學Strategy可考慮到library借英文書。
哈!哈!更好的辦法當然是報名參加公司的課程和公司的即將出版的ebook啦。
http://www.fledgetrade.com/ebook.php
Disclaimer: Fledge Algorithm Trading Co. Ltd will not be responsible for any loss arising
from any investment based on any forecast, recommendation or trading programs or other
market information provided. Trades in correspondence with algorithm programs, particularly
leveraged investment, for instance, trading in stocks, futures, Forex and other securities in
derivatives, could be uncertain and involve potential profits as well as the risk of losses. 回復 2# hongkongalgo
這樣解問題也太大了 還是用硬解的方式比較安全
去大間的誠品買寰宇系列的power language之類的就會很詳細了,
當然其他書也有針對特種平台的,可以到此站的"程式交易討論區",
或是"書籍推薦區",去爬爬看,過去很多大大有分享推薦程式的書。 答1:
input:Length(10);
Value1= Average(Close,Length);
Value2= Average(Close,Length) of Data2;
if Value1 cross over Value2 then
Buy next bar Market;
if Value1 cross under Value2 then
SellShort next bar Market;
http://images.plurk.com/c5d8f4f20d621ccdda1ada6aa4a201ca.jpg
答2:
可以,不過要看你想做到什麼程度。不過國內現在的選擇權的下單把市價單取消,所以成交上恐怕會出問題。 感謝大家所提供的意見,小弟再試試看!!!!謝謝
頁:
[1]