《HTS程式交易教學》市價上萬的買賣訊號範例

vars:count(0)
vars:lastdayclose(0)

if time=134500 then
lastdayclose=close
end if

if date[0] <> date[1] then
count=0
end if

if TIME>=092000 AND TIME<132000 and count=0 and (RSI(close,9))>75 and high<high[1] and volume>30 then
buy next bar at market
count=1
end if
if TIME>=092500 AND TIME<124000 and count=0 and (RSI(close,9))<30 and low>low[1] and volume>30 then
sell next bar at market
count=1
end if

if marketposition > 0 and count=1 and volume>650 then
sell next bar at (0.993)*entryprice(0) stop
count=2
end if
if marketposition < 0 and count=1 and volume>650 then
buy next bar at (1.005)*entryprice(0) stop
count=2
end if

if marketposition>0 then
   exitlong next bar at (0.992)*entryprice(0) stop
end if
if marketposition<0 then
   exitshort next bar at (1.008)*entryprice(0) stop
end if

if marketposition <> 0 then
   exitlong next bar at (1.066)*lastdayclose limit
   exitshort next bar at (0.934)*lastdayclose limit
end if

if time>=132500 and close<=close[1] then
exitlong next bar at market
end if
if time>=132500 and close>=close[1] then
exitshort next bar at market
end if
if time>=132500 and close>close[1] then
exitlong next bar at low stop
end if
if time>=132500 and close<close[1] then
exitshort next bar at high stop
end if
if time>=134000 then
exitlong next bar at market
    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.系統平台僅供參考,投資人仍需自行判斷負責,本人...