meimeichen 發表於 12-3-18 11:21
把你在 Eleader 跟 MC 上的圖 貼出來 對比 比較快啦
不用全貼出來 貼一小段 加上說明
會比你解釋半天 ...
請問meimei兄
小弟又自行編寫了一個程式如下
input:FastDay(4),SlowDay(29); variable:EMA_F(0),EMA_S(0); EMA_F = XAverageOrig(C, 4); EMA_S = XAverageOrig(C, 29); if marketposition=0 and EMA_F Cross Above EMA_S then begin buy("buy") next bar at market; end; if marketposition=0 and EMA_F Cross Under EMA_S then begin sellshort("sell")next bar at market; end; if marketposition>0 and EMA_F Cross Under EMA_S then begin sell ("EXIT_buy") next bar at market; end; if marketposition<0 and EMA_F Cross Above EMA_S then begin buytocover ("EXIT_sell") next bar at market; end; if marketposition>0 then sell next bar at entryprice-100*MinMove/pricescale stop; if marketposition<0 then buytocover next bar at entryprice+100*MinMove/pricescale stop; 不過回測時發現最大虧損有到10萬 想說怎麼會這樣 如果是跳空也不至於這麼慘吧 是哪邊程式沒有寫好嗎
|