Re: [問題] hts語法

看板Trading (金融交易)作者 (沒有我的新竹)時間16年前 (2009/02/19 23:03), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串2/3 (看更多)
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

02/20 19:05, , 1F
thx~
02/20 19:05, 1F
文章代碼(AID): #19dNJUln (Trading)
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 3 篇):
1
1
0
1
文章代碼(AID): #19dNJUln (Trading)