BASK TEST CODE問題
小弟新手一試用MACD升穿SIGNAL為買入MACD跌穿SIGNAL為賣出
相反亦然
A = MACD (Close,19,39);
B = Signal (Close,19,39,9);
SetPositionSize(1,spsShares);
//Open long
Buy = Cross(A,B);
//close long
Sell = Cross(B,A);
//open short
Short = Sell;
//close short
Cover = Buy;
但BACKTEST時就出現too many aurgment(LN:2 ,col:25)
點解呢??
too many aurgment(LN:2 ,col:25)
問題出在第2行,25欄
signal()只有3個argument,你寫了4個進去了 B = Signal (Close,19,39,9);
應該如何寫?
SIGNAL是3個數值?? 本帖最後由 tinyding 於 17-1-5 11:47 編輯
scottvision 發表於 17-1-5 10:12
B = Signal (Close,19,39,9);
應該如何寫?
SIGNAL是3個數值??
我不懂 AmiBroker 語法. ... 但你可以參考一下底下 Signal 的說明網頁.
https://www.amibroker.com/guide/afl/signal.html
改成咁就得:
A = MACD (19,39);
B = Signal (19,39,9); syntax的話查這個:
http://www.amibroker.com/guide/a_funref.html
頁:
[1]