con:1;//开仓条件
str:stklabel&'.'&'date';//全局变量字符串名称
//初始开仓
if con and date>extgbdata(str) and tbuyholdingex('','',2)=0 then
begin
tbuy(1,1,mkt);
extgbdataset(str,date);
end
//加仓
if con and date>extgbdata(str) and tbuyholdingex('','',1)>0 then
begin
tbuy(1,1,mkt);
extgbdataset(str,date);
end