比如昨日涨幅超过5%吧假设 那么今天就买进去,
h1:=callstock(stklabel,vthigh,6,-1);
l1:=callstock(stklabel,vtlow,6,-1);
cc:=callstock(stklabel,vtclose,6,-2);
if (h1-l1)/cc>=0.05 and todaybar=1 then begin
dd:=date;
buy(holding=0,100,marketr);
end
后设置一个条件在明天平仓 这个条件不一定 但是 即使条件不满足,也要让这只股票在明天收盘前 强制平仓掉 这个要怎么写
if 平仓条件 and dd>=date+1 and todayholding>0 then sell(1,0,marketr);
if dd>=date+1 and todayholding>0 and time0>=timetot0(closetime(0)) -5*60 then sell(1,0,marketr);//收盘前5分钟平仓