--
if duo and extgbdata(stklabel+\'nn1\')=0 then begin
tbuy(1,手数,mkt);
extgbdataset(stklabel+\'nn1\',1);
extgbdataset(stklabel+\'ss15\',手数);
end
DEBUGFILE(\'D:\\调试日志.txt\',stklabel+\'nn1%.2f\',extgbdata(stklabel+\'nn1\'));
s:=ref(15atr,tenterbars);
if kong and extgbdata(stklabel+\'mm1\')=0 then begin
tbuyshort(1,手数,mkt);
extgbdataset(stklabel+\'ss15\',手数);
extgbdataset(stklabel+\'mm1\',1);
end
DEBUGFILE(\'D:\\调试日志.txt\',stklabel+\'mm1%.2f\',extgbdata(stklabel+\'mm1\'));
s:=ref(15atr,tenterbars);
if l<=tENTERPRICE-z*s and tENTERBARS>0 and extgbdata(stklabel+\'nn1\')=1 and tbuyholding(1)>0 then begin
tsell(1,extgbdata(stklabel+\'ss15\'),mkt);
extgbdataset(stklabel+\'nn1\',0);
extgbdataset(stklabel+\'ss15\',0);
end
DEBUGFILE(\'D:\\调试日志.txt\',stklabel+\'nn1%.2f\',extgbdata(stklabel+\'nn1\'));
if h>=tENTERPRICE+z*s and tENTERBARS>0 and extgbdata(stklabel+\'mm1\')=1 and tsellholding(1)>0 then BEGIN
tsellshort(1,extgbdata(stklabel+\'ss15\'),mkt);
extgbdataset(stklabel+\'mm1\',0);
extgbdataset(stklabel+\'ss15\',0);
end
DEBUGFILE(\'D:\\调试日志.txt\',stklabel+\'mm1%.2f\',extgbdata(stklabel+\'mm1\'));