[討論] 使用 DMI 進出

看板Trading作者 (虎背熊腰的大嬸)時間9年前 (2015/07/11 01:19), 編輯推噓3(309)
留言12則, 5人參與, 最新討論串1/1
寫出來績效不是很好看, 單純跟大家討論討論 方法: DATA 1: 台指 60分K DATA 2: 加權指數 1 D DMI 使用 DATA 2 計算 一口單, 多空對翻 手續費 800 回測區間: 2011/1/31--2015/6/2 規則: DMI+ 向上穿過 DMI- 進多單 DMI+ 向下穿越 DMI- 進空單 若 DMI+ 今日較昨日低, 且手上有多單, 則反手 (還有昨天跟前天比較) 若 DMI- 今日較昨日高, 且手上有空單, 則反手 (還有昨天跟前天比較) 出來的曲線 在2013年出現最高峰, 2015 根本是慘敗 有試過加入停損翻單的語法, 不過又是個 45度角向下的醜醜圖.... 以下是 MC CODE inputs: Length( 14 ); condition1=dmiplus(length)of data2 crosses above dmiMinus(length)of data2; condition2=dmiplus(length)of data2 crosses below dmiMinus(length)of data2; if condition1 then buy ("buy") next bar at market; if condition2 then sellshort ("short") next bar at market; condition3=dmiplus(length) of data2 < dmiplus(length)of data2[1]; condition4=dmiplus(length) of data2[1] < dmiplus(length)of data2[2]; {condition5=dmiplus(length) [2] < dmiplus(length)[3];} condition6=dmiminus(length) of data2> dmiminus(length)of data2[1]; condition7=dmiminus(length)[1]of data2 > dmiminus(length)of data2[2]; {condition8=dmiplus(length) [2] < dmiplus(length)[3];} condition9=dmiplus(length)<DMIMinus(length); if barssinceentry(0)>4 then begin if marketposition=1 then if condition3 and condition4 {and condition5} and condition9=true then sellshort("Enter_short") next bar at market; if marketposition=-1 then if condition6 and condition7 {and condition8} and condition9=false then buy("enter_long") next bar at market; end; -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 123.192.240.248 ※ 文章網址: https://www.ptt.cc/bbs/Trading/M.1436548778.A.DCD.html

07/11 12:15, , 1F
感謝分享
07/11 12:15, 1F

07/30 10:28, , 2F
你只有一個指標,績效容易2極化,建議加個指標過濾,
07/30 10:28, 2F

07/30 10:28, , 3F
我在張林忠的書上看到,他加了ADX>25過篩,你可以試試。
07/30 10:28, 3F

07/30 10:28, , 4F
另外沒有任何指標適用全部的行情,被用多了,績效會Do
07/30 10:28, 4F

07/30 10:28, , 5F
wn下來,好的交易員至少有五個指標在run,不包刮自己
07/30 10:28, 5F

07/30 10:28, , 6F
開發的
07/30 10:28, 6F

07/31 00:45, , 7F
好的交易員跟有幾個指標關係不大 獲利能力跟穩定度與指標數
07/31 00:45, 7F

07/31 00:46, , 8F
沒什麼關係
07/31 00:46, 8F

08/02 17:11, , 9F
也是用 DMI 的,供參考:http://goo.gl/PrUaw6
08/02 17:11, 9F

08/10 07:14, , 10F
DMI我以前有用過,參數調整後還是覺得反應太慢被丟一邊,
08/10 07:14, 10F

08/10 07:14, , 11F
最近又撿回來用,可以當一段時間的趨勢判斷,但還是很難
08/10 07:14, 11F

08/10 07:14, , 12F
當轉折系統使用
08/10 07:14, 12F
文章代碼(AID): #1Ld_wgtD (Trading)