DRAWGBK(C>0,RGB(0,0,110),RGB(0,25,0),0,' ',0);
10,COLORYELLOW,LINETHICK1;90,COLORGREEN,LINETHICK1;N:=20;NN:=1;DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIF,9);RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;LC := REF(CLOSE,1);RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;RSI3:=SMA(MAX(CLOSE-LC,0),24,1)/SMA(ABS(CLOSE-LC),24,1)*100;CDN:=14;MM:=6;MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),CDN);HD :=HIGH-REF(HIGH,1);LD :=REF(LOW,1)-LOW;DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),CDN);DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),CDN);PDI:=DMP*100/MTR;MDI:=DMM*100/MTR;ADX:=EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,MM);ADXR:=EXPMEMA(ADX,MM);散户仓位:(WINNER(C*1.1)-WINNER(C*0.9))/WINNER(HHV(H,0))*100,COLORWHITE;主力仓位:100-(WINNER(C*1.1)-WINNER(C*0.9))/WINNER(HHV(H,0))*100,NODRAW,COLORYELLOW;ZL:=100-散户仓位;YL:=WINNER(C)*100;赚钱比:IF(NN=1,WINNER(C)*100,DRAWNULL),COLORRED,LINETHICK2;YL高位区:=COUNT((YL>90 AND 散户仓位<=10 AND RSI3>70 AND RSI2>75 AND (RSI1>80 OR ADX>60 OR PSY>80))OR (PSY>80 AND ADX>60 AND RSI1>85 AND RSI2>75 AND RSI3>70),5)>=1 AND CROSS(80,RSI1);RSI低位区:=((YL<=10 AND 散户仓位<=15 AND PSY<=30) OR PSY<20 OR RSI1<15)AND RSI1<20 AND RSI2<25 AND D<20AND (RSI1<15 OR (RSI1<20 AND EMA(C,30)>EMA(C,60) AND EMA(C,50)>EMA(C,120) AND EMA(C,120)>EMA(C,250))OR ADX>60 OR MDI>45 OR PSY<20);PSY低位区:=(PSY<=20 AND (YL<=10 OR ADX>55) AND (RSI1<20 OR D<20) AND EMA(C,50)>EMA(C,250) AND EMA(C,30)>EMA(C,60))OR (PSY<20 AND (YL<=10 OR ADX>55) AND (RSI1<15 OR D<15));PSY高位区:=CROSS(80,PSY) AND MA(C,20)>MA(C,60)AND O>MA(C,5) AND O>MA(C,10) AND O>MA(C,20) AND C<REF(C,1) AND C<REF(C,2);YL低位区:=YL<=10 AND 散户仓位<=15 AND RSI1<20 AND D<20 AND PSY<=25AND (RSI1<15 OR (RSI1<20 AND EMA(C,30)>EMA(C,60) AND EMA(C,50)>EMA(C,120) AND EMA(C,120)>EMA(C,250))OR ADX>60 OR MDI>45 OR PSY<20);三合一:=PSY<20 AND RSI1<=15 AND K<=15 AND RSI2<20 AND RSI3<30;IF(YL低位区,YL,DRAWNULL),COLORYELLOW,LINETHICK5;IF(YL低位区,散户仓位,DRAWNULL),COLORYELLOW,LINETHICK5;IF(YL高位区 OR PSY高位区,YL,DRAWNULL),COLORGREEN,LINETHICK8;抄底:=WINNER(C)*100<=10 AND (WINNER(C*1.1)-WINNER(C*0.9))/WINNER(HHV(H,0))*100<=10AND COUNT(RSI.RSI2<20 OR RSI.RSI3<30,5)>0 AND (KDJ.D<20 OR RSI.RSI1<20 OR PSY.PSY<25);STICKLINE(抄底,0,10,6,0),COLORMAGENTA;STICKLINE((YL低位区 OR PSY低位区 OR RSI低位区 OR 三合一) AND COUNT(RSI.RSI2<20 OR RSI.RSI3<30,5)>0 AND (KDJ.D<20 OR RSI.RSI1<20 OR PSY.PSY<25),0,10,4,0),COLORYELLOW;