MTR:=Ema(MAX(MAX(HIGH-LOW,Abs(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),13);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMema(IF(HD>0&&HD>LD,HD,0),13);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),13);
pdi:=DMP*100/MTR;
mdi:=DMM*100/MTR;
D:=PDI-22;
K:=MDI-22;
A:=D-K;
STICKLINE(A>0 ,D,K,0,-1),COLORWHITE;
STICKLINE(A<=0,K,D,0,-1),COLORGREEN;
多:D,COLORRED,LINETHICK2;
空:K,COLORBLUE,LINETHICK2;
ADX:EXPMEMA((PDI-MDI)/(MDI+PDI)*100,3),COLORLIMAGENTA,LINETHICK3;
ADXR:EXPMEMA(ADX,5),COLORCYAN,LINETHICK2;
趋势:EMA(ADX,13),DOTLINE,COLORBROWN;
底部:0,LINETHICK2,COLORGREEN;
VAR1:=(2*CLOSE+HIGH+LOW)/4;
VAR2:=LLV(LOW,34);
VAR3:=HHV(HIGH,34);
XX:EMA((VAR1-VAR2)/(VAR3-VAR2)*100,13);
YY:EMA(0.667*REF(XX,1)+0.333*XX,2) , ;
STICKLINE(crOSS(XX,20) AND YY<XX,XX+19,XX-10,4,0),COLORWHITE;
DRAWTEXT(CROSS(XX,20) AND YY<XX,XX-5,'百分之三! ');
STICKLINE(YY<XX,XX,YY,4,0),COLORWHITE;
选股:IF(CROSS(XX,YY) AND XX<20 ,30,0);
逃顶:IF(FILTER(CROSS(YY,XX) AND XX>80 ,3),60,90),COLORFF0000;
A1:=IF((BARSCOUNT(C)>7),100*((MA(C,7))/(LLV(MA(C,7),7))-1),1);
N:=IF(A>0.35,6,65);
HSL:=vol/CAPITAL*100;
B:=((-((100)*(HHV(H,N)-C))/(HHV(HIGH,N)-LLV(L,N))));
停板:=CROSS(B,-2);
ZDF:=(C/REF(C,1)-1)*100;
VAR11:=0-((100)*(HHV(HIGH,3)-CLOSE))/(HHV(HIGH,3)-LLV(LOW,3));
涨停:=(VAR11=0) AND ((HHV(HIGH,3))/(LLV(LOW,3))>1+(15)/(100)) AND ((HHV(HIGH,3))/(LLV(LOW,3))<1+25/100);
STICKLINE(涨停 OR ZDF>9.9,L-0.2,L-0.4,3,0),COLOR0000FF;
STICKLINE(涨停 OR ZDF>9.9,L-0.4,L-0.6,3,0),COLOR00FFFF;
STICKLINE(停板 AND HSL>4,L-0.4,L-0.6,3,0),COLOR00FFFF;
DRAWTEXT(停板 AND HSL>4,L-0.2,'【攻击】'),COLOR00EEFF;
DRAWTEXT(涨停 OR ZDF>9.9,L-0.4,'【涨停】'),COLOR00EE00;