cond1:c>ma(close,60);
cond2:c<ma(close,60);
if cond1 and holding =0 then buy (1,2,limit,close) ;//开多信号;
if cond2 then sell(1,0,market,close);//平多信号;
if cond2 and holding=0 then buyshort(1,2,market,close);//开空信号;
if c>enterprice +100 then sellshort(1,0,market,close);//平空信号
variable:n=0;
if cond2 and holding=0 and n=0 then buyshort(1,2,market,close);//开空信号;
if c>enterprice +100 then
begin
n:=1;
sellshort(1,0,market,close);//平空信号
end