顶:=BBI+3*STD(BBI,13),COLOR004AFF;
底:=BBI-3*STD(BBI,13),COLOR67FF00;
DRAWBAND(BBI,RGB(97,95,00),顶,RGB(97,95,00));
DRAWBAND(BBI,RGB(25,75,150),底,RGB(25,75,250));
{MA1:MA(CLOSE,M1);
MA2:MA(CLOSE,M2),COLORGREEN;
MA3:MA(CLOSE,M3),COLORRED;
MA4:MA(CLOSE,M4),COLORYELLOW;}
KU1:=IF(HIGH=HHV(HIGH,3),1,0);
KD1:=IF(LOW=LLV(LOW,3),1,0);
UL:=IF(REF(KU1,2)=1ANDREF(KU1,1)=0
ANDKU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1
ANDREF(KU1,1)=0ANDKU1=0)));
DL:=IF(REF(KD1,2)=1ANDREF(KD1,1)=0
ANDKD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1
ANDREF(KD1,1)=0ANDKD1=0)));
HV:=H>ULANDH>REF(H,1);
LV:=L<DLANDL<REF(L,1);
GP:=BARSLAST(HV);
DP:=BARSLAST(LV);
IP:=IF(GP=0,DP,GP)>3;
HHV1:=HVANDIPANDH>=HHV(H,BARSLAST(LV));
LV1:=LVANDIPANDL<=LLV(L,BARSLAST(HV));
DRAWLINE(LV1,LOW,HHV1,HIGH,0),COLORYELLOW,LINETHICK2;
DRAWLINE(HHV1,HIGH,LV1,LOW,0),COLORMAGENTA,LINETHICK2;
STICKLINE(CLOSE>REF(CLOSE,1),HIGH,LOW,0,1),COLORRED;
STICKLINE(CLOSE>REF(CLOSE,1),OPEN,CLOSE,3,0),COLOR000055;
STICKLINE(CLOSE>REF(CLOSE,1),OPEN,CLOSE,2.7,0),COLOR000077;
STICKLINE(CLOSE>REF(CLOSE,1),OPEN,CLOSE,2.1,0),COLOR000099;
STICKLINE(CLOSE>REF(CLOSE,1),OPEN,CLOSE,1.5,0),COLOR0000BB;
STICKLINE(CLOSE>REF(CLOSE,1),OPEN,CLOSE,0.9,0),COLOR0000DD;
STICKLINE(CLOSE>REF(CLOSE,1),OPEN,CLOSE,0.3,0),COLOR0000FF;
STICKLINE(CLOSE=REF(CLOSE,1),HIGH,LOW,0,1),COLORWHITE;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,3,0),COLOR555555;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,2.7,0),COLOR777777;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,2.1,0),COLOR999999;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,1.5,0),COLORBBBBBB;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,0.9,0),COLORDDDDDD;
STICKLINE(CLOSE=REF(CLOSE,1),OPEN,CLOSE,0.3,0),COLORFFFFFF;
STICKLINE(CLOSE<REF(CLOSE,1),HIGH,LOW,0,1),COLORCYAN;
STICKLINE(CLOSE<REF(CLOSE,1),OPEN,CLOSE,3,0),COLOR990000;
STICKLINE(CLOSE<REF(CLOSE,1),OPEN,CLOSE,2.7,0),COLORCC0000;
STICKLINE(CLOSE<REF(CLOSE,1),OPEN,CLOSE,2.1,0),COLORFF4400;
STICKLINE(CLOSE<REF(CLOSE,1),OPEN,CLOSE,1.5,0),COLORFF8800;
STICKLINE(CLOSE<REF(CLOSE,1),OPEN,CLOSE,0.9,0),COLORFFCC00;
STICKLINE(CLOSE<REF(CLOSE,1),OPEN,CLOSE,0.3,0),COLORCYAN;
{笔底分型选股预警确保向下笔成立后的底分型}
V00:=HIGH<REF(HIGH,1)ANDLOW<REF(LOW,1);
V01:=HIGH<REF(HIGH,1)ANDLOW>REF(LOW,1);
V02:=HIGH>REF(HIGH,1)ANDLOW<REF(LOW,1);
V03:=HIGH>REF(HIGH,1)ANDLOW>REF(LOW,1);
V04:=REF(HIGH,2)<HIGHANDREF(LOW,2)<LOW
ANDREF(HIGH,2)>REF(HIGH,1)ANDREF(LOW,2)<REF(LOW,1);
V1:=COUNT(V00,6)>=3ANDCOUNT(V01ORV02,5)=0ANDLLVBARS(LOW,6)=1ANDHHVBARS(HIGH,6)>=5ANDV03;
V2:=COUNT(V00,7)>=3ANDCOUNT(V01ORV02,6)=1ANDLLVBARS(LOW,7)=2ANDHHVBARS(HIGH,7)>=6ANDV04;
V3:=COUNT(V00,7)>=3ANDCOUNT(V01ORV02,6)=1ANDLLVBARS(LOW,7)=1ANDHHVBARS(HIGH,7)>=6ANDV03;
V4:=COUNT(V00,8)>=3ANDCOUNT(V01ORV02,7)<=2ANDLLVBARS(LOW,8)=2ANDHHVBARS(HIGH,8)>=7ANDV04;
V5:=COUNT(V00,8)>=3ANDCOUNT(V01ORV02,7)<=2ANDLLVBARS(LOW,8)=1ANDHHVBARS(HIGH,8)>=7ANDV03;
V6:=COUNT(V00,9)>=3ANDCOUNT(V01ORV02,8)<=3ANDLLVBARS(LOW,9)=2ANDHHVBARS(HIGH,9)>=8ANDV04;
V7:=COUNT(V00,9)>=3ANDCOUNT(V01ORV02,8)<=3ANDLLVBARS(LOW,9)=1ANDHHVBARS(HIGH,9)>=8ANDV03;
V8:=COUNT(V00,10)>=3ANDCOUNT(V01ORV02,9)<=4ANDLLVBARS(LOW,10)=2ANDHHVBARS(HIGH,10)>=9ANDV04;
V9:=COUNT(V00,10)>=3ANDCOUNT(V01ORV02,9)<=4ANDLLVBARS(LOW,10)=1ANDHHVBARS(HIGH,10)>=9ANDV03;
V10:=COUNT(V00,11)>=3ANDCOUNT(V01ORV02,10)<=5ANDLLVBARS(LOW,11)=2ANDHHVBARS(HIGH,11)>=10ANDV04;
XG:=V1ORV2ORV3ORV4ORV5ORV6ORV7ORV8ORV9ORV10;
DRAWICON(FILTER(XG=1,5),L*0.97,1);
{笔顶分型选股预警确保向上笔成立后的顶分型}
HV00:=HIGH>REF(HIGH,1)ANDLOW>REF(LOW,1);
HV01:=HIGH<REF(HIGH,1)ANDLOW>REF(LOW,1);
HV02:=HIGH>REF(HIGH,1)ANDLOW<REF(LOW,1);
HV03:=HIGH<REF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