Z1:=STRCAT(HYBLOCK,' ');
Z2:=STRCAT(Z1,DYBLOCK);
Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,10,0,STRCAT(Z3,GNBLOCK)),COLOR0000FF;
DRAWTEXT_FIX(1,0.00,0.00,0,'主题投资:')COLOR0000FF;
DRAWTEXT_FIX(1,0.07,0.00,0,EXTERNSTR(0,1))COLOR0000FF;
DRAWTEXT_FIX(1,0.00,0.08,0,'主营业务:')COLORFF00FF;
DRAWTEXT_FIX(1,0.07,0.08,0,EXTERNSTR(0,2))COLORFF00FF;
流通市值:(FINANCE(40)/100000000),NODRAW,COLORRED;
DRAWBAND(MA(CLOSE,5),RGB(155,50,55),MA(C,13),RGB(83,123,68));
DRAWKLINE(H,O,L,C);
涨停:=C>REF(C,1)*1.09 AND C=H;
STICKLINE(涨停,OPEN,CLOSE,4,0),COLORRED;
STICKLINE(涨停,OPEN,CLOSE,3,0),COLORYELLOW;
C3:=REF(C,1);
跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);
STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;
ZT:=(C/REF(C,1)-1)*100>9.5 AND NOT(REF((C/REF(C,1)-1)*100>9.5,1));
ZT1:=BARSLAST((C/REF(C,1)-1)*100>9.5);
ZT2:=BARSLAST(ZT);
ZT3:=REF(H,ZT2)-REF(L,ZT2);
WX:=MA(C,0);
M5:MA(CLOSE,5);
M13:MA(CLOSE,13),COLORYELLOW;
M20:MA(CLOSE,20)*IF(4< 2,WX,1),COLORMAGENTA;
M30:MA(CLOSE,30)*IF(4< 3,WX,1),COLORCYAN;
M60:MA(CLOSE,60)*IF(4< 4,WX,1),COLORGREEN;
趋势:=MA(MA(CLOSE,3),1),LINETHICK1;
趋势1:=MA(MA(CLOSE,3),3);
趋势2:IF(趋势>=趋势1,趋势1,DRAWNULL),COLORRED,LINETHICK2;
DK:=O>REF(H,1) AND C>REF(H,1) AND L>REF(H,1);
ZTS:=C< REF(C,1)*1.07 AND NOT(REF(C>REF(C,1)*1.09 AND C=H,1));
KXST:=C/O< 1.025 AND C/O>0.97;
SYX:=(H-MAX(C,O))/MAX(C,O)*100>3.3 AND H>HHV(REF(H,1),20) AND KXST;
换手:=VOL/CAPITAL*100;
T5:=换手>2 AND 换手< 35;
跳空上阴:=(DK OR SYX) AND ZTS AND C< 45 AND T5;
TH:=O>REF(C,1) AND L>REF(C,1) AND C/REF(C,1)>=1.03;
QSJ:=BETWEEN(C>MA(C,20),1,65);
QK:=QSJ AND TH;
高量:=(V/REF(V,1)>3 AND COUNT(C>O,1)) OR (L>REF(H,1) AND COUNT(O>C,1) AND V/REF(V,1)>3);
★早晨之星:=REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND REF(OPEN,1) < REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)< 0.03 AND CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2);
★黄昏之星:=REF(CLOSE,2)/REF(OPEN,2) > 1.03 AND REF(OPEN,1) > REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)< 0.02 AND CLOSE/OPEN< 0.97 AND CLOSE< REF(CLOSE,2);
★长十字:=CLOSE=OPEN AND HIGH/LOW >1.03;
★垂死十字:=CLOSE=OPEN AND CLOSE=LOW AND CLOSE!=HIGH;
★早晨十字星:=REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND REF(OPEN,1) < REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) AND CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2);
★黄昏十字星:=REF(CLOSE,2)/REF(OPEN,2) > 1.05 AND REF(OPEN,1) > REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) AND CLOSE/OPEN< 0.95 AND CLOSE< REF(CLOSE,2);
★射击之星:=MIN(OPEN,CLOSE)=LOW AND HIGH-LOW >2.3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE>MA(CLOSE,5);
★倒转锤头:=MIN(OPEN,CLOSE)=LOW AND HIGH-LOW >3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE< MA(CLOSE,5);
★锤头:=HIGH = MAX(OPEN,CLOSE) AND HIGH-LOW > 3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE < MA(CLOSE,5);
STICKLINE(★倒转锤头,O,C,2,0),COLORMAGENTA;
锤头:=(((HIGH = MAX(OPEN,CLOSE)) AND ((HIGH - LOW) > (3 * (HIGH - MIN(OPEN,CLOSE))))) AND (CLOSE < MA(CLOSE,5)));
STICKLINE(★锤头,O,C,2,0),COLORMAGENTA;
★吊颈:=HIGH = MAX(OPEN,CLOSE) AND HIGH-LOW > 3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE>MA(CLOSE,5);
★穿头破脚:=(REF(CLOSE,1)/REF(OPEN,1)>1.03 AND CLOSE/OPEN< 0.96 AND CLOSE< REF(OPEN,1) AND OPEN>REF(CLOSE,1)) OR (REF(CLOSE,1)/REF(OPEN,1)< 0.97 AND CLOSE/OPEN>1.04 AND CLOSE>REF(OPEN,1) AND OPEN< REF(CLOSE,1));
★乌云盖顶:=REF(CLOSE,1)/REF(OPEN,1)>1.03 AND CLOSE/OPEN< 0.97 AND OPEN>REF(CLOSE,1) AND CLOSE< REF(CLOSE,1);
曙光初现:=REF(CLOSE,1)/REF(OPEN,1)< 0.97 AND CLOSE/OPEN>1.03 AND OPEN< REF(CLOSE,1) AND CLOSE>REF(CLOSE,1);
STICKLINE(曙光初现,O,C,1,0),COLORMAGENTA;
★身怀六甲:=ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1) > 0.04 AND ABS(CLOSE-OPEN)/CLOSE< 0.005 AND MAX(CLOSE,OPEN) < MAX(REF(CLOSE,1),REF(OPEN,1)) AND MIN(CLOSE,OPEN) > MIN(REF(CLOSE,1),REF(OPEN,1));
★十字胎:=ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1) > 0.04 AND CLOSE=OPEN AND CLOSE < MAX(REF(CLOSE,1),REF(OPEN,1)) AND CLOSE > MIN(REF(CLOSE,1),REF(OPEN,1));
★平顶:=ABS(HIGH-REF(HIGH,1))/HIGH< 0.001;
★平底:=(ABS(LOW-REF(LOW,1))/LOW< 0.001 AND ABS(REF(LOW,1)-REF(LOW,2))/REF(LOW,1)<=0.001);
★大阳烛:=CLOSE/OPEN>1.05 AND HIGH/LOW < CLOSE/OPEN+0.018;
★红三兵:=REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)>REF(OPEN,1) AND CLOSE>OPEN AND REF(CLOSE,1)>REF(CLOSE,2) AND CLOSE>REF(CLOSE,1);
★双飞乌鸦:=REF(CLOSE,1)< REF(OPEN,1) AND CLOSE< OPEN AND CLOSE/OPEN< 0.98;
★孕育线:=REF(CLOSE,2)>REF(OPEN,2) AND (REF(CLOSE,2)-REF(OPEN,2))/REF(OPEN,2)>=2/100 AND REF(OPEN,1)>=REF(CLOSE,1) AND (REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<=2/100 AND REF(OPEN,1)<=REF(CLOSE,2) AND REF(CLOSE,1)>=REF(OPEN,2) AND C>=OPEN AND (CLOSE-OPEN)/OPEN>=2/100 AND CLOSE>=REF(OPEN,1) AND OPEN<=REF(CLOSE,1) AND (MAX(CLOSE,REF(C,2))-MIN(CLOSE,REF(CLOSE,2)))/MIN(CLOSE,REF(CLOSE,2))<=1/100;
★多方炮:=REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)< REF(OPEN,1) AND CLOSE>OPEN;
★出水芙蓉:=(OPEN< EMA(C,20) OR OPEN< EMA(C,40) OR OPEN< EMA(C,60)) AND (C>MAX(EMA(C,20),MAX(EMA(C,40),EMA(C,60)))) AND (V/MA(V,30)>1.2 AND C/REF(C,1)>1.049);
★上升三部曲:=REF(CLOSE,4)/REF(OPEN,4)>1.03 AND REF(CLOSE,3)< REF(OPEN,3) AND REF(CLOSE,2)< REF(OPEN,2) AND REF(CLOSE,1)< REF(OPEN,1) AND REF(LOW,4)< REF(LOW,3) AND REF(LOW,4)< REF(LOW,2) AND REF(LOW,4)< REF(LOW,1) AND REF(HIGH,4)>REF(HIGH,3) AND REF(HIGH,4)>REF(HIGH,2) AND REF(HIGH,4)>REF(HIGH,1) AND CLOSE/OPEN>1.03 AND CLOSE>REF(CLOSE,4);
ZTL:=C>REF(C,1)*1.09 AND C=H AND O/REF(C,1)< 1.06;
ZTTJ:=COUNT(REF(ZTL,2),50)>=1 ;
HPOO:=(HHV(CLOSE,20)-LLV(CLOSE,20))/REF(C,1)*100< 20;
TJ1:=REF(ABS(C-O)< 0.12,1);
TJ2:=REF(ABS((C-O)/O)< 0.03,1);
A1:=IF(C>O,C,O);
TJ3:=REF(H/A1>(1+1/100),1);
TJ4:=(MIN(O,C)-L)/L*100>2 AND (C<=O OR C< REF(H,1)) AND ABS((C-O)/O)< 0.01;
CRX:=TJ2 AND TJ3 AND TJ4;
跌幅:=-(C-REF(C,1))/REF(C,1)*100;
CY1:=O< REF(L,1) AND REF(C< O,1) AND BETWEEN(C/O,0.99,1.02) AND C< REF(C,1) AND (跌幅>1.5 OR (C>REF(C,1) AND C< O));
弃婴1:=(O< REF(L,1) AND REF(C< O,1) AND BETWEEN(C/O,0.99,1.02) AND C< REF(C,1) AND ABS(OPEN-CLOSE)/CLOSE< 0.04 AND CLOSE< MA(CLOSE,5)) OR (O< REF(L,1) AND REF(C< O,1) AND BETWEEN(C/O,0.99,1.02) AND C< REF(C,1));
STICKLINE(弃婴1 OR CRX OR CY1,H,L,0.1,0),COLORYELLOW;
STICKLINE(弃婴1 OR CRX OR CY1,O,C,2,0),COLORGREEN;
AA1:=3*SMA((C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100,3,1)-2*SMA(SMA((C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100,3,1),3,1);
加仓:=IF(CROSS(AA1,REF(AA1+0.01,1)) AND LLV(AA1,2)=LLV(AA1,8) AND BETWEEN(AA1,20,60),1,0);
波段:=(3)*(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1)) - (2)*(SMA(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1),3,1));
DRAWICON(加仓 AND HPOO AND ZTTJ,L*0.97,23);
DRAWICON(CROSS(波段,3) AND HPOO AND ZTTJ,L*0.97,11);
A:=(3*C+L+O+H)/6;
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+ 14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12) +7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/210;
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
CB:=EMA(X,13);
卖:=IF(HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) AND CROSS(MA(DX,2),DX),1,0);
DL:=V<=REF(LLV(V,13),1);
BL:=(V/REF(V,1)>=1.8 AND COUNT(C>O,1)) OR (L>REF(H,1) AND COUNT(O>C,1) AND V/REF(V,1)>=1.8);
DDLTJ:=COUNT(DL,20)>=2 AND COUNT(REF(V,1)< REF(MA(V,5),1),6)>=1 AND (COUNT(REF(V,1)< REF(MA(V,60),1),8)>=2 OR COUNT(REF(V,1)< REF(MA(V,20),1),8)>=2);
买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX< 0,2) AND CROSS(DX,MA(DX,2)),1,0);
DRAWTEXT(FILTER(买=1 AND DDLTJ AND HPOO,5),LOW-0.03,'*关注'),COLORMAGENTA;
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
BDGD:=HHV(J,2)=HHV(J,8) AND J>80;
注意:=IF(CROSS(REF(J-0.01,1),J) AND REF(BDGD,1),1,0);
加仓A:=SMA(EMA((C-REF(C,1))/REF(C,1),5)*100,3,1)*10;
DRAWTEXT(FILTER((CROSS(加仓A,0) OR CROSS(CLOSE,CB)) AND 买!=1 AND ZTTJ AND HPOO AND DDLTJ,3),LOW-0.03,'*加仓'),COLORRED;
MA18:=MA(C,18);
跟:=IF(MA18>=REF(MA18,3) AND CROSS(CLOSE,MA18),1,0);
DRAWTEXT(MA18>=REF(MA18,3) AND CROSS(CLOSE,MA18) AND HPOO AND ZTTJ AND DDLTJ,LOW*0.96,'*跟'),COLORYELLOW;
JX60:=ABS(H-MA(C,60))/MA(C,60)*100<=12;
JX20:=ABS(MA(C,20)-MA(C,60))/MA(C,60)*100<=16;
A5:=MA(C,5);
A10:=MA(C,10);
A20:=MA(C,20);
A30:=MA(C,30);
A60:=MA(C,60);
MAX20:=MAX(MAX(A5,A10),A20);
MIN20:=MIN(MIN(A5,A10),A20);
SXNH:=(MAX20-MIN20)/MIN20*100<=6;
TKX:=H-L>3*(MAX(O,C)-L) AND H/L>=1.035 AND C/L<=1.02;
SMKX:=BETWEEN((C/REF(C,1)-1)*100,4.9,-2) AND ABS((C-O)/O)<=0.017;
KXXT:=COUNT(TKX OR SMKX,8)>=1;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MDJC:=DIF>=DEA;
Z1T:=(C-REF(C,1))/REF(C,1)>=0.097;
NZT:=NOT(REF(Z1T,1)=1) AND C>MA(C,5) AND C>MA(C,10);
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
牛线:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16 *REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11 *REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5 *REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210;
马线:=MA(牛线,6);
MAA5:=MA(C,5);
H1:=MAX(MAX(MA(C,5),MA(C,马线)),MA(C,牛线));
L1:=MIN(MIN(MA(C,5),MA(C,马线)),MA(C,牛线));
G2:=C>=MA(C,20) AND (C>=MA(C,10) OR C>=MA(C,5));
YYCX:=H1< C AND O< L1 AND G2 AND V>REF(V,1);
ZTTJA:=COUNT(REF(ZT,2),50)>0;
DW:=REF(((HHV(H,5)-LLV(L,5))/LLV(L,5)),1)<=0.14;
SJ:=BARSCOUNT(C)>280 AND ZTTJA AND L/REF(H,1)< 1.04 AND DW;
LL:=REF(L,2);
XQK:=REF(H,1)< LL;
YSB:=REF(C,1)< REF(O,1) AND REF(VOL,1)/VOL>1.90;
STICKLINE(XQK AND YSB AND DW,H,L,0.1,0),COLORLICYAN;
DRAWTEXT(XQK AND YSB AND DW,L-0.1,'洗底');
XGQQ:=JX20 AND JX60 AND SJ AND SXNH AND DDLTJ AND BL AND NZT AND KXXT;
DRAWICON(XGQQ,L*0.97,25);
DRAWICON(XGQQ,L*0.99,1);
AA:=C/REF(C,1)>1.098;
BB:=BARSLAST(AA);
CC:=L< (REF(H,BB) + REF(L,BB))/2;
DD:=COUNT(CC,BB)=1 AND CC AND BB< 10;
GG:=BARSLAST(DD);
HH:=H>REF(L,GG)*1.04;
卖出:=COUNT(HH,GG)=1 AND HH AND GG< 10 AND GG>=1;
STICKLINE(AA,C,O,3,0),COLORMAGENTA;
STICKLINE(DD,C,O,3,0),COLORGREEN;
STICKLINE(卖出,C,O,3,0),COLORYELLOW;
DRAWICON(DD,L,27);
STICKLINE(DD,L,L-0.5,0,0),COLORGREEN;
DRAWTEXT(DD,L-0.5,'▲伏击'),COLORGREEN;