新手請問EasyLanguage程式 - 財經
By Iris
at 2008-11-10T18:46
at 2008-11-10T18:46
Table of Contents
請問各位大大
小弟剛剛接觸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;
請問該怎麼改寫呢? 謝謝~~
--
Tags:
財經
All Comments
By Mary
at 2008-11-12T14:38
at 2008-11-12T14:38
By Hedwig
at 2008-11-16T14:37
at 2008-11-16T14:37
By Cara
at 2008-11-18T07:23
at 2008-11-18T07:23
By Jack
at 2008-11-20T06:26
at 2008-11-20T06:26
By Madame
at 2008-11-21T07:25
at 2008-11-21T07:25
By Skylar DavisLinda
at 2008-11-24T18:29
at 2008-11-24T18:29
By Lydia
at 2008-11-28T16:33
at 2008-11-28T16:33
By Isla
at 2008-11-29T12:24
at 2008-11-29T12:24
By Valerie
at 2008-11-30T00:45
at 2008-11-30T00:45
By Thomas
at 2008-12-01T08:40
at 2008-12-01T08:40
By Madame
at 2008-12-05T01:40
at 2008-12-05T01:40
Related Posts
日盛智慧單
By Andrew
at 2008-11-05T10:49
at 2008-11-05T10:49
請注意日盛智慧單掛點
By Hardy
at 2008-11-03T10:26
at 2008-11-03T10:26
關於 HyperTools 轉檔問題
By Freda
at 2008-11-02T06:04
at 2008-11-02T06:04
關於 HyperTools 轉檔問題
By Vanessa
at 2008-11-02T01:19
at 2008-11-02T01:19
(日盛HTS)(STS)程式交易概論
By Agatha
at 2008-10-31T22:36
at 2008-10-31T22:36