作者timwen (没有我的新竹)
看板Trading
标题Re: [问题] hts语法
时间Thu Feb 19 23:03:55 2009
if dayofweek(date)=3 and dayofmonth(date)>=14 and 21>=dayofmonth(date) then
condition1=true
else
condition1=false
end if
if condition1=false then
if currentcontracts>0 and time=134000 then
exitlong("EB-N") next bar at market
end if
if 0>currentcontracts and time=134000 then
exitshort("ES-N") next bar at market
end if
end if
if condition1=true then
if currentcontracts>0 and time=132500 then
exitlong("EB-C") next bar at market
end if
if 0>currentcontracts and time=132500 then
exitshort("ES-C") next bar at market
end if
end if
参考参考...
原文
http://skyelephant.blogspot.com/2008/12/15.html
不过开一个参数比较方便,要记得改结算日就是了
像下面这样
if date = xxxxxxx and currentcontracts <> 0 and time = 1325 then
exitlong next bar at market
exitshot next bar at market
end if
※ 引述《r4444 (复杂)》之铭言:
: 请问如果要设定每逢礼拜三就在时间1325出场
: 那语法上要怎写呢?
: 如果能提供每个月第三个礼拜三 time=1325
: 就出场的写法就更好了.....^^
--
我的Blog - 大象飞上天
http://skyelephant.blogspot.com/
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 124.8.2.120
1F:→ r4444:thx~ 02/20 19:05