-- 自动交易
a1:=stickline(barpos=datacount-22,c,o,10,0,COLORMAGENTA);
a2:=stickline(barpos=datacount-10,c,o,10,0,COLORMAGENTA);
a3:=c<a1;
a4:=c>a1;
mm:=ref(h,1)=hhv(h,3);
nn:=ref(l,1)=llv(l,3);
if mm then bj:=1;
if nn then bj:=-1;
nn1:=barslast(mm);
nn2:=barslast(nn);
if c<ref(l,nn1+1) and bj=1 then i:=1;
if c>ref(h,nn2+1) and bj=-1 then i:=-1;
uu3:=cross(i=1,0.5);//绿
uu4:=cross(i=-1,0.5);//红
if a3 and uu3 then begin
buyshort(holding=0,1,market);//阴包阳,卖出
end
if a4 and uu4 then begin
buy(holding=0,1,market);//阳包阴,买入
end
if holding>0 and c>a2 then sellshort(1,0,thisclose);
if holding>0 and c<a2 then sell(1,0,thisclose);
问一下 为什么我这个代码放在交易系统里面不能进行交易?求改正!