-- 作者:jinzhe
-- 发布时间:2013/3/6 15:22:52
--
条件:前一日收盘价>前一日开盘价;
交易方式:收盘价买进多单,次交易日开盘价卖出平仓
variable:riqi=0;
c1:callstock(stklabel,vtclose,6,-1);
o1:casllstock(stklabel,vtopen,6,-1);
if c1>o1 then begin
buy(holding=0,1,limitr,c);
riqi:=date;
end
if date>=riqi+1 then sell(holding>0,0,limitr,o);
因为日线上会有假日从而导致 date不连续,所以用了大于等于判断,而不是等于
|