VARIABLE:s=0;//用全局变量记录你要的值
buycond:=ref(count(c>o,2)=2,1);
sellcond:=ref(count(c<o,2)=2,1);
if holding>0 and sellcond and enterbars>5 then sell(1,1,market);
if buycond and holding=0 then
begin
buy(1,1,market);
s:=0;
end
if holding>0 and c>ENTERPRICE and c>o then s:=s+(c-o);
谢谢了。 我看明白了。