《HTS程式交易教學》[教學信號]DMI-買賣訊號範例[免費訊號教學]

Parameter: Length(14)
Variables: SumDX(0), Counter(0)
1.系統平台僅供參考,投資人仍需自行判斷負責,本人不負任何法律責任。
2.任何參數請客戶自行設定,本人僅提供介面語法操作說明
3.實際可交易商品相關資訊請以主管機關公告為限。
condition1= plusDI(Length) > minusDI(length)
condition2= plusDI(length) < minusDI(length)
condition3= ADX(length)[0]>ADX(length)[1]
condition4= ADX(length)[0]<ADX(length)[1]

if condition1 and condition3 then buy next bar at market
end if

if condition2 and condition3 then sell next bar at market
end if


if currentcontracts=1 and condition2  then exitlong next bar at market
end if

if currentcontracts=-1 and  condition1 then exitshort next bar at market
end if

沒有留言:

張貼留言

《HTS程式交易教學》[教學信號]KD買賣訊號範例[免費訊號教學]

Parameters : HighLowTerm(9), kLength(3), dLength(3), OverSold(20), OverBought(80) variables:value(0),value2(0); 1.系統平台僅供參考,投資人仍需自行判斷負責,本人...