N:=34;
M1:=3;
M2:=3;
DRAWGBK(C>0,RGB(0,10,10),RGB(88,0,0),0,'0',0);
DRAWGBK(C>0,RGB(40,120,20),RGB(00,00,00),0,'0',1);
DRAWGBK(C>0,RGB(80,100,120),RGB(00,00,00),0,'0',1);
Z111:=STRCAT(HYBLOCK,'----');
Z211:=STRCAT(Z111,FGBLOCK);
Z311:=STRCAT(Z211,DYBLOCK);
Z411:=STRCAT(Z311,'----');
DRAWTEXT_FIX(1,0.00,0.00,0,'【主题概念】')COLORCYAN;
DRAWTEXT_FIX(ISLASTBAR,0.09,0.00,0,STRCAT(Z411,GNBLOCK)),COLORCYAN;
NW1:=CLOSE/REF(CLOSE,1)>1.03;
NW2:=EMA(CLOSE,9);
NW3:=EMA(NW2*1.13,5);
NW4:=CLOSE>=OPEN;
NW5:=EMA(NW2*1.12,5);
NW6:=EMA(NW2*1.11,5);
NW7:=crOSS(CLOSE,NW6);
NW8:=CROSS(CLOSE,NW3);
NW9:=CROSS(CLOSE,NW5);
NW10:=(NW8 OR NW9 OR NW7 AND NW4 AND NW1);
NW11:=HHV(HHV(LOW,14),60);{BB}
NW12:=HHV(MA((L+H+C)/3,8),60),COLORFF00FF;{X}
NW13:=EMA(EMA(NW12,14)+2*STD(NW11,14),4),COLORAAAAAA;
NW14:=C>NW12 AND C>NW13 AND NW10;
纲一:EMA(EMA(NW11,16)-2*STD(NW11,16),3),COLORAAAAAA;
纲二:EMA(EMA(NW11,14)+2*STD(NW11,14),8),COLORAAAAAA;
STICKLINE(纲一>0 ,纲一 ,纲二 ,0 ,0 ),COLOR555555;
DRAWTEXT_FIX(CLOSE>0,0,0.06,0,'【仓位管理】')COLORYELLOW;
{DRAWTEXT_FIX(CLOSE>0,0.09,0.06,0,'红色持仓,黄棕色警告,青色空仓,黄色芯涨停,蓝色芯跌停,粉上影线涨停后回落,蓝下影线跌停后回升,k线进网小心,蓝色忽略 ')COLORFF9900;}
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1);
D:=SMA(K,M2,1);
持仓段:=D>LLV(D,2);
STICKLINE(持仓段=1 AND CLOSE>=OPEN,OPEN,CLOSE,3,1),COLORRED;
STICKLINE(持仓段=1 AND CLOSE>=OPEN,CLOSE,HIGH,0,1),COLORRED;
STICKLINE(持仓段=1 AND CLOSE>=OPEN,LOW,OPEN,0,1),COLORRED;
STICKLINE(持仓段=1 AND CLOSE<=OPEN,OPEN,CLOSE,3,0),COLORRED;
STICKLINE(持仓段=1 AND CLOSE<=OPEN,HIGH,LOW,0,0),COLORRED;
STICKLINE(持仓段=1 AND K<REF(K,1) AND CLOSE>=OPEN,OPEN,CLOSE,3,1),COLOR3399CC;
STICKLINE(持仓段=1 AND K<REF(K,1) AND CLOSE>=OPEN,CLOSE,HIGH,0,1),COLOR3399CC;
STICKLINE(持仓段=1 AND K<REF(K,1) AND CLOSE>=OPEN,LOW,OPEN,0,1),COLOR3399CC;
STICKLINE(持仓段=1 AND K<REF(K,1) AND CLOSE<=OPEN,OPEN,CLOSE,3,0),COLOR3399CC;
STICKLINE(持仓段=1 AND K<REF(K,1) AND CLOSE<=OPEN,HIGH,LOW,0,0),COLOR3399CC;
STICKLINE(持仓段=0 AND CLOSE>=OPEN,CLOSE,OPEN,3,1),COLORCYAN;
STICKLINE(持仓段=0 AND CLOSE>=OPEN,CLOSE,HIGH,0,1),COLORCYAN;
STICKLINE(持仓段=0 AND CLOSE>=OPEN,LOW,OPEN,0,1),COLORCYAN;
STICKLINE(持仓段=0 AND CLOSE<=OPEN,CLOSE,OPEN,3,0),COLORCYAN;
STICKLINE(持仓段=0 AND CLOSE<=OPEN,HIGH,LOW,0,0),COLORCYAN;
NGH:= C<纲一;
STICKLINE(NGH,O,C,3,0),COLORFF9900;
STICKLINE(NGH,L,H,0,0),COLORFF9900;
BK:=IF(INBLOCK('科创板'),0.2,IF(INBLOCK('创业板'),0.2,IF(INBLOCK('ST板块'),0.05,0.1)));
XA_1:=IF(DATE<=1200823,1,1);
STICKLINE((C>=ZTPRICE(REF(CLOSE,1),0.1) AND C=H) AND XA_1=1,O,C,2.7,0),COLORRED;
STICKLINE((C<=DTPRICE(REF(CLOSE,1),0.1) AND C=L) AND XA_1=1,O,C,2.7,0),COLORBLUE;
STICKLINE((C>=ZTPRICE(REF(C,1),BK) AND C=H),O,C,1,0),COLORYELLOW;
STICKLINE((C<=DTPRICE(REF(C,1),BK) AND C=L),O,C,1,0),COLORBLUE;
STICKLINE((H>=ZTPRICE(REF(C,1),BK) AND C<H) OR (H>=ZTPRICE(REF(CLOSE,1),0.1) AND C<H AND XA_1=1),H,MAX(C,O),0.2,0),COLORMAGENTA;
STICKLINE((L<=DTPRICE(REF(C,1),BK) AND C>L) OR (L<=DTPRICE(REF(CLOSE,1),0.1) AND C>L AND XA_1=1),L,MIN(C,O),0.2,0),COLORBLUE;