請問各位大大
小弟剛剛接觸EasyLanguage
想寫個小程式來試試TS的flow
下列程式片段的目的很簡單
就是挑一個weekday(例如星期四)開盤買 收盤賣
if date >= BEGIN_DAY and date <= END_DAY then begin
if DayofWeek(date+1)=4 then Buy ("W") Next Bar at Open;
if DayofWeek(date)=4 then Exitlong this bar on close;
End;
可是有時候星期四沒開盤(星期三五有)
她就會建倉於星期五
我知道是這行出問題
if DayofWeek(date+1)=4 then Buy ("W") Next Bar at Open;
請問該怎麼改寫呢? 謝謝~~
--
小弟剛剛接觸EasyLanguage
想寫個小程式來試試TS的flow
下列程式片段的目的很簡單
就是挑一個weekday(例如星期四)開盤買 收盤賣
if date >= BEGIN_DAY and date <= END_DAY then begin
if DayofWeek(date+1)=4 then Buy ("W") Next Bar at Open;
if DayofWeek(date)=4 then Exitlong this bar on close;
End;
可是有時候星期四沒開盤(星期三五有)
她就會建倉於星期五
我知道是這行出問題
if DayofWeek(date+1)=4 then Buy ("W") Next Bar at Open;
請問該怎麼改寫呢? 謝謝~~
--
All Comments