后台直接监控账户持仓
if TACCOUNT(6)<1000000 then
begin
tsell(tbuyholding(1)<>0,tbuyholding(1)/2,mkt);
tsellshort(tsellholding(1)<>0,tsellholding(1)/2,mkt);
end
那可以用GLOBALVARIABLE来控制次数。
GLOBALVARIABLE:n=0;
if TACCOUNT(6)<1000000 and n=0 then
begin
tsell(tbuyholding(1)<>0,tbuyholding(1)/2,mkt);
tsellshort(tsellholding(1)<>0,tsellholding(1)/2,mkt);
n:=1;
end