if TACCOUNT( 4)<-50000 and tbuyholding(1)>0 and extgbdata('biaoji')=0 then begin
tbuyshort(tsellholding(1)=0,tbuyholding(1),mkt);
extgbdataset('biaoji',1);
end
if TACCOUNT( 4)<-50000 and tsellholding(1)>0 and extgbdata('biaoji')=0 then begin
tbuy(tbuyholding(1)=0,tsellholding(1),mkt);
extgbdataset('biaoji',1);
end
if time=closetime(0) then extgbdataset('biaoji',0);
根据用户的需求,是上面代码的结果,如果有新的想法,或者说上面的和用户所想的不一样,请及时反馈