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

Parameters : HighLowTerm(9), kLength(3), dLength(3), OverSold(20), OverBought(80)
variables:value(0),value2(0);
1.系統平台僅供參考,投資人仍需自行判斷負責,本人不負任何法律責任。
2.任何參數請客戶自行設定,本人僅提供介面語法操作說明
3.實際可交易商品相關資訊請以主管機關公告為限。
Value1 = FastD( High, Low, Close, HighLowTerm)
value2=MA( Value1, dLength)

if value1>OverBought and value2>OverBought and value1 cross over value2 then
buy("long") next bar at market
end if

if value1<OverSold and value2<OverSold and value1 cross below value2  then
sell("short") next bar at market
end if

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

param:Length(14),SellLine(70),BuyLine(30)
1.系統平台僅供參考,投資人仍需自行判斷負責,本人不負任何法律責任。
2.任何參數請客戶自行設定,本人僅提供介面語法操作說明
3.實際可交易商品相關資訊請以主管機關公告為限。
condition1=rsi(close,Length)>SellLine
condition2=rsi(close,Length)<BuyLine

if condition1 then
sell("空") next bar at market
end if

if condition2 then
buy("多") next bar at market
end if

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

Parameters: FastMA(12),SlowMA(26),MacdMA(9)
variables:value1(0)
1.系統平台僅供參考,投資人仍需自行判斷負責,本人不負任何法律責任。
2.任何參數請客戶自行設定,本人僅提供介面語法操作說明
3.實際可交易商品相關資訊請以主管機關公告為限。
value1=MACD(close,FastMA,SlowMA)

condition1=value1 crosses over EMA(value1,MacdMA)
condition2=value1 crosses below EMA(value1,MacdMA)

If condition1 then
buy("多") next bar at market
End if

If condition2 then
sell("空") next bar at market
End if

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

param: 短MA參數(5),長MA參數(10)
1.系統平台僅供參考,投資人仍需自行判斷負責,本人不負任何法律責任。
2.任何參數請客戶自行設定,本人僅提供介面語法操作說明
3.實際可交易商品相關資訊請以主管機關公告為限。
condition1=close > average(close,短MA參數)
condition2=close < average(close,長MA參數)

if condition1  then

 buy("多") next bar at market

end if

if condition2  then

sell("空") next bar at market

end if

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

param: 短MA參數(5),長MA參數(10)
1.系統平台僅供參考,投資人仍需自行判斷負責,本人不負任何法律責任。
2.任何參數請客戶自行設定,本人僅提供介面語法操作說明
3.實際可交易商品相關資訊請以主管機關公告為限。

condition1=average(close,短MA參數) > average(close,長MA參數)
condition2=average(close,短MA參數) < average(close,長MA參數)



if condition1 and high<high[1]then buy("多")
next bar at market
end if

if condition2 and low>low[1] then sell("空")
next bar at market
end if

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

param: 短MA參數(5),中MA參數(10),長MA參數(20)
1.系統平台僅供參考,投資人仍需自行判斷負責,本人不負任何法律責任。
2.任何參數請客戶自行設定,本人僅提供介面語法操作說明
3.實際可交易商品相關資訊請以主管機關公告為限。
condition1=average(close,短MA參數) cross over average(close,中MA參數)
condition2=average(close,短MA參數) cross under average(close,中MA參數)
condition3=average(close,短MA參數) cross over average(close,長MA參數)
condition4=average(close,短MA參數) cross under average(close,長MA參數)

if condition1 and condition3 then buy("多")
next bar at market
end if

if condition2 and condition4 then sell("空")
next bar at market
end if

《HTS程式交易教學》[教學信號]william's%R買賣訊號範例[免費訊號教學]

Parameter: Length(10), OverSold(-20), OverBought(-80)
1.系統平台僅供參考,投資人仍需自行判斷負責,本人不負任何法律責任。
2.任何參數請客戶自行設定,本人僅提供介面語法操作說明
3.實際可交易商品相關資訊請以主管機關公告為限。
condition1=PercentR(Length)cross over OverSold
condition2=percentR(Length)cross under OverSold
condition3=PercentR(Length)cross over OverBought
condition4=percentR(Length)cross under OverBought


if condition1 then buy next bar at market
end if
if condition2 then sell next bar at market
end if
if condition3 then buy  next bar at market
end if
if condition4 then sell next bar at market
end if

《HTS程式交易教學》[教學信號]布林/包寧傑通道買賣訊號範例[免費訊號教學]

Parameter: Price(Close), Length(20), UpMultiplier(2.0), DnMultiplier(-2.0), HoriMove(0)
1.系統平台僅供參考,投資人仍需自行判斷負責,本人不負任何法律責任。
2.任何參數請客戶自行設定,本人僅提供介面語法操作說明
3.實際可交易商品相關資訊請以主管機關公告為限。
Value11 = MAFC(Price, Length)
Value12 = StdDev(Price, Length)
Value1 = Value11 + UpMultiplier * Value12
Value2 = Value11 + DnMultiplier * Value12

Condition1 = Close Cross Over Value1
Condition2 = Close Cross Under value2
condition3 = close cross under value1
condition4 = close cross over value2

if condition1   then buy next bar at market
end if
if condition2  then sell next bar at market
end if

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

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

《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(14), kLength(3), dLength(3), OverSold(20), OverBought(80)
variables:value(0),value2(0)
1.系統平台僅供參考,投資人仍需自行判斷負責,本人不負任何法律責任。
2.任何參數請客戶自行設定,本人僅提供介面語法操作說明
3.實際可交易商品相關資訊請以主管機關公告為限。

Value1 = FastD( High, Low, Close, HighLowTerm)
value2=MA( Value1, dLength)
condition1=value1<OverSold and value2<OverSold and value1 cross over value2
condition2=value1>OverBought and value2>OverBought and value1 cross below value2

if condition1 then
buy("多") next bar at market
end if
if condition2 then
sell("空") 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.系統平台僅供參考,投資人仍需自行判斷負責,本人...