DIFF := EMA(CLOSE,12) - EMA(CLOSE,26); DEA := EMA(DIFF,9); MA5:=EMA(CLOSE,5); MA10:=MA(CLOSE,10); AA:=MA(C,30); macd:=stkindi('','macd.macd1',0,6);//日macd值 J:=stkindi('','kdj.j',0,6); if CROSS(AA,REF(AA,1)) AND MACD>REF(MACD,1) and CURRENTTIME>=144530 and tbuyholding(1)=0 and TTOTALDAYTRADE<1 then BEGIN tbuy(1,10000/close,mkt); SENDMAIL(1,'13913992413@139.COM;13773473555@139.COM',STKLABEL&STKNAME&NUMTOSTR(CLOSE,2)&'《买》_【普9_30日均线调头】',''),allowerpeat; End if (c>tenterprice*1.045 or c<tenterprice*0.93 or tenterbars>=16) and CURRENTTIME>=144430 and tbuyholding(1)=0>0 then BEGIN tsell(1,0,mkt); SENDMAIL(1 ,'13913992413@139.COM;13773473555@139.COM',STKLABEL&STKNAME&NUMTOSTR(CLOSE,2)&'《卖》_【普9_30日均线调头】',''),allowerpeat; end