2012年8月15日 星期三
2012年8月14日 星期二
程式交易 - 加減碼程式寫法(HTS)
alue1 = average(close, 5)
Value2 = average(close, 10)
if currentcontracts = 0 and Value1 cross over Value2 then
buy("b1") 1 contracts next bar at market
end if
if currentcontracts = 1 and Value1 cross over Value2 then
buy("b2") 1 contracts next bar at market
end if
if currentcontracts = 2 and close < average(close, 30) and entryname(0) = "b2" then
exitlong next bar at market
buy("b3") 1 contracts next bar at market
end if
http://ssdkchang.blogspot.tw/2009/07/hts.html
訂閱:
文章 (Atom)