cangwei:=if(stricmp(strleft(stklabel,2),'rb')=0,10,if(stricmp(strleft(stklabel,2),'ta')=0,5,0)); ma30:=ma(c,30); if holding>0 and c<ma30 and cangwei>0 then sell(1,cangwei,thisclose); if holding=0 and c>ma30 and cangwei>0 then buy(1,cangwei,thisclose);