DRAWTEXT_FIX(1,0.073,0,0,HYBLOCK),COLORRED; {行业}

LC:=REF(CLOSE,1);

WRSI:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;

WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;

活跃:=(WRSI-WR10);

活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2));

DRAWTEXT_FIX(1,0.20,0.25,1,STRCAT(STRCAT('活跃:',CON2STR(活跃度比,2)),'%')),COLORCYAN;

CJL:=IF(DYNAINFO(10)>99999999,STRCAT(CON2STR(DYNAINFO(10)/100000000,2)<10,'亿'),STRCAT(CON2STR(DYNAINFO(10)/10000,0),'万'));

DRAWTEXT_FIX(01,0.01,0.01.0,0,CJL),COLOR0099FF;

主力成本线:EMA(COST(10),250),COLORYELLOW,CIRCLEDOT,LINETHICK2;

DRAWICON(CROSS(C,主力成本线) AND L,L,18);

{STICKLINE(CROSS(C,主力成本线),L,L*999999999,8,0),COLORGREEN;}

工作线:=EMA(CLOSE,14),COLORFFFFFF;

生命线:=EMA(CLOSE,47);

VAR326:=IF(CLOSE>REF(CLOSE,1),88,0);

VAR327:=IF(CLOSE/REF(CLOSE,1)>1.050 AND HIGH/CLOSE<1.010 AND VAR326>0, 91, 0);

STICKLINE(VAR327>90,L*0.99,L*0.95,4,0),COLORGREEN;

DRAWTEXT(VAR327>90,LOW*0.95,'追涨'),COLORYELLOW;

下降压力线:DRAWLINE(HIGH>=HHV(HIGH,100),HIGH,LOW<=LLV(LOW,3),HHV(HIGH,3),10),LINETHICK2,COLORMAGENTA;

MA5:=MA(C,5),COLORYELLOW;

MA10:=MA(CLOSE,10),COLORFF00FF;

MA30:=MA(C,30),COLORRED,LINETHICK2;

跌:=IF(MA(CLOSE,30)<=REF(MA(CLOSE,30),1),MA(CLOSE,30),DRAWNULL),COLORGREEN,LINETHICK2;

MA60:=MA(CLOSE,60),COLORFFCC66;

GJTJ1:=100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5));

GJTJ2:=100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10));

GJTJ3:=100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20));

GJTJ4:=100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30));

BAIJIN1:=BARSLAST(CROSS(30,GJTJ1))<2 AND BARSLAST(CROSS(GJTJ1,50))<2;

BAIJIN2:=BARSLAST(CROSS(GJTJ4,GJTJ1))<2 AND GJTJ1>GJTJ4;

BAIJIN3:=GJTJ1>60 AND GJTJ4>70;

DRAWTEXT(BAIJIN1 AND BAIJIN2 AND BAIJIN3,L+0.40,'白金'),COLORWHITE;

VVV:=(BAIJIN1 AND BAIJIN2 AND BAIJIN3,L+0.40,'白金'),COLORWHITE;

STICKLINE((BAIJIN1) AND (BAIJIN2) AND (BAIJIN3),L,L*999999999,100,0),COLORWHITE;

VAR1:=CLOSE-LOW;

VAR2:=HIGH-LOW;

VAR3:=CLOSE-HIGH;

VAR4:=IF(HIGH>LOW,(VAR1/VAR2+VAR3/VAR2)*VOL,0);

HPTP:=SUM(VAR4,10)/10000,COLORSTICK;

TKXL:=-1;

XVYO:=UPNDAY(TKXL,1),NODRAW;

G:=MA(C,5);

D:=MA(C,10);

HH:=REF(H,5)=HHV(H,11);

LL:=REF(L,5)=LLV(L,11);

FG01:=BACKSET(HH,6)>BACKSET(HH,5);

FD01:=BACKSET(LL,6)>BACKSET(LL,5);

FG02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND G>D,FG01,

IF(BARSLAST(FD01)>BARSLAST(FG01),FG01,0));

FD02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND D>G,FD01,

IF(BARSLAST(FG01)>BARSLAST(FD01),FD01,0));

FG0:=FG02 AND H=HHV(H,BARSLAST(FD02));

FD0:=FD02 AND L=LLV(L,BARSLAST(FG02));

GQ:=L>REF(H,1) AND DAY!=REF(DAY,1);

DQ:=H<REF(L,1) AND DAY!=REF(DAY,1);

FGH:=REF(H,BARSLAST(FG0));

FGL:=REF(L,BARSLAST(FG0));

FGH1:=REF(H,BARSLAST(FG0)+1);

FGL1:=REF(L,BARSLAST(FG0)+1);

FGL2:=REF(L,BARSLAST(FG0)+2);

FDH2:=REF(H,BARSLAST(FD0)+2);

FDH:=REF(H,BARSLAST(FD0));

FDL:=REF(L,BARSLAST(FD0));

FDH1:=REF(H,BARSLAST(FD0)+1);

FDL1:=REF(L,BARSLAST(FD0)+1);

FGZL:=IF(FGH1<FGL,FGL,IF(FGL<=FGL1,FGL2,FGL1));

FDZH:=IF(FDL1>FDH,FDH,IF(FDH>=FDH1,FDH2,FDH1));

FG1:=FGH>FDZH AND FG0;

FD1:=FDL<FGZL AND FD0;

FG:=FG1 AND FGH>FDH AND FGL>FDL AND FGL1>FDL;

FD:=FD1 AND FDL<FGL AND FDH<FGH AND FDH1<FGH;

BH0:=(H<=REF(H,1) AND L>=REF(L,1)) OR (H>=REF(H,1) AND L<=REF(L,1));

BHG:=COUNT(BH0,BARSLAST(FD0));

BHD:=COUNT(BH0,BARSLAST(FG0));

BGQ:=COUNT(GQ,BARSLAST(FD0));

BDQ:=COUNT(DQ,BARSLAST(FG0));

BK0:=IF(BHG>0,BHG+2,IF(BHD,BHD+2,3));

BK:=IF(BGQ,BK0-BGQ,IF(BDQ,BK0-BDQ,BK0));

G1X:=(FG AND BARSLAST(FD)>BK),NODRAW;

D1X:=(FD AND BARSLAST(FG)>BK),NODRAW;

G1:=(FG0 AND REF(H,BARSLAST(FG0))>=REF(H,BARSLAST(G1X)) AND BARSLAST(D1X)>BARSLAST(G1X))

OR (FG1 AND COUNT(GQ,BARSLAST(FD1))>0 AND REF(H,BARSLAST(FG1))>REF(H,BARSLAST(G1X)));

{W:=IF(DATE<1201231,C,DRAWNULL);}

D1:=(FD0 AND REF(L,BARSLAST(FD0))<=REF(L,BARSLAST(D1X)) AND BARSLAST(G1X)>BARSLAST(D1X))

OR (FD1 AND COUNT(DQ,BARSLAST(FG1))>0 AND REF(L,BARSLAST(FD1))<REF(H,BARSLAST(D1X)));

G1H:=IF(BARSLAST(D1)>BARSLAST(G1),REF(H,BARSLAST(G1)),REF(H,BARSLAST(D1))),NODRAW;

D1L:=IF(BARSLAST(G1)>BARSLAST(D1),REF(L,BARSLAST(D1)),REF(L,BARSLAST(G1))),NODRAW;

G2:=G1 AND H=HHV(G1H,BARSLAST(D1)+1) AND H>REF(H,1) AND BARSLAST(D1)>BARSLAST(G1);

D2:=D1 AND L=LLV(D1L,BARSLAST(G1)+1) AND L<REF(L,1) AND BARSLAST(G1)>BARSLAST(D1);

NN:=G2 OR (FG0 AND REF(H,BARSLAST(FG0))>REF(H,BARSLAST(G2))

AND BARSLAST(D2)>BARSLAST(G2));

UU:=D2 OR (FD0 AND REF(L,BARSLAST(FD0))<REF(L,BARSLAST(D2))

AND BARSLAST(G2)>BARSLAST(D2));

找顶线:=DRAWLINE(NN,H,REF(NN,1),REF(H,1),1),COLORGREEN,DOTLINE;

找底线:=DRAWLINE(UU,L,REF(UU,1),REF(L,1),1),COLORRED,DOTLINE;

ZT:=C=ZTPRICE(REF(C,1),0.1);

STICKLINE(ZT,C,O,2,0),COLORMAGENTA;

DRAWICON(CROSS(C,找顶线),找顶线,34);