生命线:ma(C,60),COLORWHITE;
IF(C>=生命线,生命线,DRAWNULL),COLORWHITE,LINETHICK2;
IF(C<生命线,生命线,DRAWNULL),COLORYELLOW,LINETHICK2;
MA5:MA(C,5)COLORLIMAGENTA;
MA10:MA(C,10)COLORLIBLUE;
MA25:MA(C,25)COLORLICYAN;
选股1:=crOSS(C,MA5) AND CROSS(C,MA10) AND CROSS(C,MA25);
DRAWICON(选股1,L*0.997,5);
A1:=C>REF(C,4);
NT:=BArslASTCOUNT(A1);
TJ11:=NT=9;
TJ13:=ISLASTBAR AND BETWEEN(NT,5,8);
AY:=(BacKSET(TJ11>0,9) OR BACKSET(TJ13>0,NT))*NT;
DRAWTEXT(AY>0,H*1.002,VAR2STR(AY,0)),COLORWHITE;
DRAWTEXT(NT=9,H*1.002,'9'),COLORYELLOW;
B1:=C<REF(C,4);
NT0:=BARSLASTCOUNT(B1);
TJ21:=NT0=9 ;
TJ23:=ISLASTBAR AND BETWEEN(NT0,5,8);
AY1:=(BACKSET(TJ21>0,9) OR BACKSET(TJ23>0,NT0))*NT0;
DRAWTEXT(AY1>0,L*0.99,VAR2STR(AY1,0)),COLORLIGRAY;
DRAWTEXT(NT0=9,L*0.99,'9'),COLORMAGENTA;
{======行业概念======}
Z11:=STRCAT(DYBLOCK,' ');
Z22:=STRCAT(Z11,HYBLOCK);
Z33:=STRCAT(Z22,' ');
Z44:=STRCAT(Z33,GNBLOCK);
Z55:=STRCAT(Z44,' ');
Z66:=STRCAT(Z55,FGBLOCK);
DRAWTEXT_FIX(ISLASTBAR,0.10,0.99,0,STRCAT(Z66,ZHBLOCK)),COLORYELLOW;
DRAWTEXT_FIX(1,0.1,0.9,0,STRCAT('【自定板块】:',ZDBLOCK)),COLORLIMAGENTA;
{顶底指标}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1)COLORWHITE,LINETHICK1;
D:=SMA(K,3,1)COLORYELLOW,LINETHICK1;
J:=3*K-2*D,COLORLIRED,LINETHICK2;
DRAWICON(J<100 AND REF(J,1)>100,H,2);
J值上拐:=IF(CROSS(J,0),1,0),COLORLIGRAY,NODRAW;
DRAWTEXT(J值上拐,L*0.99,'底'),COLORWHITE;
TC1:=IF(H=HHV(H,48),H,DRAWNULL);
TC2:=CONST(BARSLAST(TC1=H))+1;
UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));
BC1:=IF(L=LLV(L,48),L,DRAWNULL);
BC2:=CONST(BARSLAST(BC1=L))+1;
LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));
LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;{低点定位}
HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;{高点定位}
DRAWTEXT(LP,L*0.99,'↖波段底'),COLORLIBLUE;{波段底文字提示}
DRAWTEXT(HP,H*1.0051,'←波段顶'),COLORLIMAGENTA;{波段顶文字提示};