http://www.yctseng.net/2009/09/hts.html
請觀察這一段用來測試的程式碼:
if D=1090827 and T=134500 then
Buy ("B0") 1 contract next bar at Market
end if
if D=1090828 and T=134500 then
Buy ("B1") 3 contract next bar at Market
end if
if D=1090831 and T=134500 then
Buy ("B2") 5 contract next bar at Market
end if
if D=1090902 and D>D[1] then
ExitLong 2 contract total next bar at Market
end if
答案就是ExitLong 2 contract total next bar at Market裡面的 TOTAL 這個字!要單純的做減碼不要用from entry去指定,因為那不是總部位的減碼。

另外,您會需要參考這一篇:http://www.yctseng.net/2007/04/hts_8722.html
本文內容僅供參考,無任何買賣建議,投資人應謹慎評估,風險自負。