life-struggler 發表於 15-10-5 10:50

求指點!!!

以下兩種買入語法,但Black Test 結果差很遠,為什麼?

Buy = Cross (MACD(Fast, Slow), Signal(Fast, Slow, Signal)) AND K <20 AND BuyPrice > 1.5;

10 years net profit (%) = 4X %

BUY = Cross (MACD(Fast, Slow), Signal(Fast, Slow, Signal) AND K < 20 AND BuyPrice >1.5);

10 years net profit (%) = 9XX %

Signal(Fast, Slow, Signal) AND K < 20 AND BuyPrice >1.5 <-呢句可以點樣理解?

個分別主要係?



easytrader788 發表於 15-10-5 15:21


Buy = Cross (MACD(Fast, Slow), Signal(Fast, Slow, Signal)) AND K <20 AND BuyPrice > 1.5;

它是 3個條件成立才進場
1. Cross (MACD(Fast, Slow), Signal(Fast, Slow, Signal))
2.K <20
3. BuyPrice > 1.5

BUY = Cross (MACD(Fast, Slow), Signal(Fast, Slow, Signal) AND K < 20 AND BuyPrice >1.5);

它是 1個條件成立進場
MACD(Fast, Slow)與 (Signal(Fast, Slow, Signal) AND K < 20 AND BuyPrice >1.5) 交叉時進場 , 但是 Signal(Fast, Slow, Signal) AND K < 20 AND BuyPrice >1.5 傳回的是 true (或是 false) , 對數字判斷來說是 1 (true)或0 (false) , 所以它的進場條件會是相似於
Buy =Cross( MACD(Fast,Slow) , 1) 或是
Buy =Cross( MACD(Fast,Slow) , 0)

life-struggler 發表於 15-10-9 10:33

easytrader788 發表於 15-10-5 15:21 static/image/common/back.gif
Buy = Cross (MACD(Fast, Slow), Signal(Fast, Slow, Signal)) AND K1.5;

它是 3個條件成立才進場


Thanks 師兄的解釋!

頁: [1]
查看完整版本: 求指點!!!