DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
DEAA:EMA(DIFF, 9),COLORGREEN, linethick1;
DEAC:EMA(DIFF, 1),COLORRED,linethick1;
MACD:2*(DIFF-DEAA),COLORSTICK,linethick1;
JC:=CROSS(DIFF,DEA);
SC:=CROSS(DEA,DIFF);
JCCOUNT:=COUNT(JC,BARSLAST(DEA>0));
TEXT:=NUMTOSTR(JCCOUNT);
DRAWTEXT(DEA<0 AND JC,DEA*0.9,TEXT),COLORMAGENTA;
PARTLINE(DIFF,DIFF
强弱十五:=48*(HHV(CLOSE, 15)-CLOSE)/(HHV(HIGH, 15)-LLV(LOW, 15));
强弱三十五:=48*(HHV(CLOSE, 35)-CLOSE)/(HHV(HIGH, 35)-LLV(LOW, 35));
强弱七十五:=48*(HHV(CLOSE, 75)-CLOSE)/(HHV(HIGH, 75)-LLV(LOW, 75));
强弱一百二十:=48*(HHV(CLOSE,120)-CLOSE)/(HHV(HIGH,120)-LLV(LOW,120));
强弱一百八十:=48*(HHV(CLOSE,188)-CLOSE)/(HHV(HIGH,188)-LLV(LOW,188));
年强:=(强弱一百八十<=ref(强弱一百八十<=0.01,1));
百二十强:=(强弱一百二十<=ref(强弱一百二十<=0.01,1));
七十五强:=(强弱七十五<=ref(强弱七十五<=0.01,1));
三十五强:=(强弱三十五<=ref(强弱三十五<=0.01,1));
十五强:=(强弱十五<=ref(强弱十五<=0.01,1));
乖离百二十:=(CLOSE-MA(CLOSE,120))/MA(CLOSE,120)*100;
乖离六十:=(CLOSE-MA(CLOSE,60))/MA(CLOSE,60)*100;
乖离二十:=(CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*100;
乖离十:=(CLOSE-MA(CLOSE,10))/MA(CLOSE,10)*100;
乖离百二十强:(乖离百二十>ref(百二十强,1))*百二十强*MACD*1.38,pointdot,COLORRED,linethick4;
乖六十强:(乖离六十>ref(七十五强,1))*七十五强*MACD*1.28,pointdot,COLORGREEN,linethick4;
乖二十强:(乖离二十>ref(三十五强,1))*三十五强*MACD*1.18,pointdot,COLORMAGENTA,linethick4;
乖十强:(乖离十>ref(十五强,1))*十五强*0.88*MACD,pointdot,COLORyellow,linethick4;
零:-0,COLORBLACK,linethick3;