SHORT:=4;
LONG:=10;
MID:=3;
SHORT1:=4;
LONG1:=10;
MID1:=3;
月K:="KDJ.K#MONTH";
月D:="KDJ.D#MONTH";
周K:="KDJ.K#WEEK";
周D:="KDJ.D#WEEK";
日K:="KD.K";
日D:="KD.D";
T1:=月K>月D AND 周K>周D AND 日K>日D;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID);
MACD:=(DIF-DEA)*2;
T2:=DIF>DEA ;
MA5:=MA(C,5);
MA10:=MA(C,10);
MA60:=MA(C,60);
T3:=(MA5>MA10 ) AND (MA(C,5)>REF(MA(C,5),1) AND
ATAN((MA(C,5)/REF(MA(C,5),1)-1)*100)*57.3>=20 AND ATAN((MA(C,10)/REF(MA(C,10),1)-1)*100)*57.3>=10);
DIF1:=EMA(VOL,SHORT1)-EMA(VOL,LONG1);
DEA1:=EMA(DIF1,MID1);
MACD1:=DIF1-DEA1;
S1:=CROSS(DIF1,DEA1);
LZR:=BARSLAST(S1);
T4:=BETWEEN(LZR,0,10);
买进:=(T1 AND T2 AND T3 AND T4);
T6:=CROSS(DEA,DIF) ;
卖出:=T6;
X_1:=(2*CLOSE+HIGH+LOW)/4;
X_2:=LLV(LOW,5);
X_3:=HHV(HIGH,5);
X_4:=EMA((X_1-X_2)/(X_3-X_2)*27,5);
X_5:=EMA(X_4,3);
潜伏:FILTER(WINNER(CLOSE)-REF(WINNER(CLOSE),1)>0.1 AND CLOSE/REF(CLOSE,1)<1.05
AND CAPITAL<1000000000 AND EVERY(X_4>17,3) AND EVERY(X_5>17,3),30) AND DIF>DEA;