RSV:=(CLOSE-LLV(LOW,11))/(HHV(HIGH,11)-LLV(LOW,11))*100;
DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,27);
DEA1:=EMA(DIFF,9);
MACD1:=2*(DIFF-DEA1),COLORSTICK,LINETHICK2;
趋势:=MA(MACD,1);
DRAWICON(MACD1>REF(MACD1,1) AND 趋势>0 ,趋势,1);
低位金叉:=CROSS(DIF,DEA) AND DIF<-0.1;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=(3*K-2*D);
DRAWTEXT(二次金叉,DEA*1,'低二叉'),COLORYELLOW;
周DIF:="MACD.DIF#WEEK"(12,26,9);
周DEA:="MACD.DEA#WEEK"(12,26,9);
周MACD:="MACD.MACD#WEEK"(12,26,9);
DIF周金叉:=CROSS(周DIF,周DEA);
DRAWTEXT(DIF周金叉,0,'周叉'),COLORYELLOW;
DRAWTEXT(CROSS(周DEA,周DIF),0,'周死'),COLORGREEN;
MACD周金叉:=CROSS(周MACD,周DIF) AND 周MACD>=(0-0.05) AND 周MACD<=0.02;
VARR:=EMA(EMA(CLOSE,13),13);
控盘:=(VARR-REF(VARR,1))/REF(VARR,1)*1000;
A10:=CROSS(控盘,0);
控盘B:=FILTER(IF(A10,1,0),5);
JJ:=DYNAINFO(11);
P:=55;S:=8;M1:=3;
刘:=(EMA(CLOSE,S)-EMA(CLOSE,P))*10;
剑:=EMA(刘,M1);
BTJ11:=(C-JJ)/JJ<-0.03;
BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;
BTJ3:=CROSS(刘,剑) AND 刘<-0.3;
BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,13);
庄:= BTJ11 AND BTJ2 AND BTJ3;
有庄:=FILTER(庄,55),COLORWHITE;
DRAWTEXT(BTJ811,-0.2,'★有庄'),COLORYELLOW;
DRAWTEXT(CROSS(J,-3),DIF,'出击'),COLORWHITE;
A1:=BARSLAST(REF(CROSS(EMA(CLOSE,12)-EMA(CLOSE,26),EMA(EMA(CLOSE,12)-EMA(CLOSE,26),9)),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND EMA(CLOSE,12)-EMA(CLOSE,26)>REF(EMA(CLOSE,12)-EMA(CLOSE,26),A1+1) AND CROSS(EMA(CLOSE,12)-EMA(CLOSE,26),EMA(EMA(CLOSE,12)-EMA(CLOSE,26),9));
底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORMAGENTA,LINETHICK2;
A2:=BARSLAST(REF(CROSS(EMA(EMA(CLOSE,12)-EMA(CLOSE,26),9),EMA(CLOSE,12)-EMA(CLOSE,26)),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(EMA(CLOSE,12)-EMA(CLOSE,26),A2+1)>EMA(CLOSE,12)-EMA(CLOSE,26) AND CROSS(EMA(EMA(CLOSE,12)-EMA(CLOSE,26),9),EMA(CLOSE,12)-EMA(CLOSE,26));
顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;