DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);
DEA := EMA(DIFF,9);
MA5:=EMA(CLOSE,5);
MA10:=MA(CLOSE,10);
macd:=stkindi('','macd.macd1',0,6);//日macd值
J:=stkindi('','kdj.j',0,6);
if CROSS(diff,dea) and CURRENTTIME>144500 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)& '《买》_【普1_macd金叉】',''),allowerpeat;
end
if (J>118 or c>tenterprice*1.045 or c<tenterprice*0.93 or tenterbars>=20 or CROSS(dea, diff) or cross(ma10,ma5)) and tbuyholding(0)>0 then BEGIN
tsell(1,0,mkt);
SENDMAIL(1 ,'13913992413@139.COM; 13773473555@139.COM',STKLABEL & STKNAME & NUMTOSTR(CLOSE,2)&'《卖》_【普1_macd金叉】',''),allowerpeat;
end
if CROSS(diff,dea) and CURRENTTIME>144500 and tbuyholding(1)=0 and TTOTALDAYTRADE<1 then BEGIN
这个条件限制的时间范围有问题 ,CURRENTTIME>144500 and CURRENTTIME<150000
你这个是逻辑漏洞问题,未出现是因为,其他的几个条件有不成立的。并不代表这个时间限制条件正常