主图
P:=1;
DD:=L=LLV(L,20) AND LLV(L,20)<REF(LLV(L,20),1);
涨停:REF(C,1)*IF(INBLOCK('创业板') AND (YEAR*10000+MONTH*100+DAY)>=20200824,1.2,IF(INBLOCK('科创板'),1.2,IF(INBLOCK('ST板块') AND (CODELIKE('00') OR CODELIKE('60')),1.05,1.1))),COLORRED,NODRAW;
跌停:REF(C,1)*IF(INBLOCK('创业板') AND (YEAR*10000+MONTH*100+DAY)>=20200824,0.8,IF(INBLOCK('科创板'),0.8,IF(INBLOCK('ST板块') AND (CODELIKE('00') OR CODELIKE('60')),0.95,0.9))),COLORGREEN,NODRAW;
ZT:=PERIOD=5 AND C/涨停>0.99 AND C=H ;
DT:=跌停>=L ;
{STICKLINE(ZT,O,C,-1,0),COLORRED;
STICKLINE(DT AND ZT,O,(O+C)/2,-1,0),COLORGREEN;}
STICKLINE(BARSLAST(ZT),REF(C,BARSLAST(ZT)),REF(C,BARSLAST(ZT)),5,0),COLOR00DDDD;
STICKLINE(BARSLAST(ZT),REF(L,BARSLAST(ZT)),REF(L,BARSLAST(ZT)),5,0),COLORLIGRAY;
DRAWICON(CROSS(C,REF(C,BARSLAST(ZT))),REF(C,BARSLAST(ZT)),1);
DRAWICON(CROSS(REF(L,BARSLAST(ZT)),C),REF(L,BARSLAST(ZT)),2);
TDS:=COUNT(ZT,BARSLAST(DD));
DRAWTEXT(ZT=1 ,H,VARCAT('',VAR2STR(TDS,0))),DRAWABOVE,COLORYELLOW;
M1:IF(P=1,EMA(C,5)*1.2,DRAWNULL),COLORBLUE;
M2:IF(P=1,EMA(C,5)*1.1,DRAWNULL),COLORGREEN,DOTLINE;
M3:IF(P=1,EMA(C,5)*0.97,DRAWNULL),COLORGREEN,DOTLINE;
{停复牌大旗}
BAR:=CALCSTOCKINDEX('999999','FPY',1);
ZRRS1:=DATETODAY(DATE)-DATETODAY(REF(DATE,1))-1;
JYRS1:=REF(BAR,1)-BAR-1;
TODAY:=ISLASTBAR AND DYNAINFO(51)=0;
JYRS:=IF(TODAY,JYRS1+1,JYRS1);
ZRRS:=IF(TODAY,ZRRS1+1,ZRRS1);
FP:=JYRS>0;
FPB:=BARSLAST(FP);
最近停牌日期:=REF(DATE+19000000,FPB+1),NODRAW,COLORWHITE; {次日停牌}
最近复牌日期:=IF(TODAY,DRAWNULL,REF(DATE,FPB)),NODRAW,COLORWHITE;
停牌自然日日数:=REF(ZRRS,FPB),NODRAW,COLOR00AAFF;
停牌交易日数:=REF(JYRS,FPB),NODRAW,COLOR00AAFF;
最近停牌:=VARCAT(VAR2STR(REF(DATE+19000000,1),0),' 次日起停牌');
最近复牌:=VARCAT(VAR2STR(DATE+19000000,0),' (');
停牌日:=VARCAT(VARCAT('停牌',VAR2STR(停牌自然日日数,0)),'天,');
交易日:=VARCAT(VAR2STR(停牌交易日数,0),') ');
复牌天数:IF(V>0,FPB+1,0),COLORYELLOW,NODRAW;
DPSQ:=INDEXC>=REF(INDEXC,复牌天数);
DPXQ:=INDEXC<REF(INDEXC,复牌天数);
大盘上幅:=IF(FP AND DPSQ,(INDEXC/REF(INDEXC ,复牌天数))*100-100,0);
大盘下幅:=IF(FP AND DPXQ,(INDEXC/REF(INDEXC,复牌天数))*100-100,0);
上幅:=VARCAT(VARCAT('',VAR2STR(大盘上幅,2)),'%');
下幅:=VARCAT(VARCAT('',VAR2STR(大盘下幅,2)),'%');
复牌标1:=VARCAT(VARCAT(最近复牌,交易日),上幅);
复牌标2:=VARCAT(VARCAT(最近复牌,交易日),下幅);
DRAWTEXT(FP AND V>0 AND DPSQ,L,复牌标1),DRAWABOVE,COLORMAGENTA;
DRAWTEXT(FP AND V>0 AND DPXQ,L,复牌标2),DRAWABOVE,COLORGREEN;
DRAWTEXT(FP AND V=0,REF(L,1),最近停牌),DRAWABOVE,COLORYELLOW;
波段起涨点1 副图
X_1:=(2*CLOSE+HIGH+LOW)/4;
X_2:=LLV(LOW,5);
X_3:=HHV(HIGH,5);
X_4:=EMA((X_1-X_2)/(X_3-X_2)*27,5);
X_5:=EMA(X_4,3);
XG:STICKLINE(FILTER(WINNER(CLOSE)-REF(WINNER(CLOSE),1)>0.1 AND CLOSE/REF(CLOSE,1)<1.05 AND CAPITAL<1000000000 AND EVERY(X_4>17,3) AND EVERY(X_5>17,3),30),0,3,1.5,0)COLOR008000;
波段起涨点2副图
X_1:=CLOSE/MA(CLOSE,40)*100<78;
X_2:=CLOSE/MA(CLOSE,60)*100<74;
X_3:=HIGH>LOW*1.051;
X_4:=X_3 AND COUNT(X_3,5)>1;
X_5:=IF(X_4 AND (X_1 OR X_2),2,0);
X_6:=CLOSE/REF(CLOSE,25)<=1.1;
X_7:=SMA(MAX(CLOSE-REF(CLOSE,2),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,2)),7,1)*100<15;
X_8:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
X_9:=SMA(X_8,2,1);
X_10:=SMA(X_9,2,1);
X_11:=IF(X_9>REF(X_9,1) AND REF(X_9,1)<REF(X_9,2) AND X_9<23,1.5,0);
X_12:=DATE<1231216;
X_13:=X_12 AND X_6 AND X_5 AND X_7 AND X_11;
波段起点2:X_13,COLORRED;
DRAWICON(X_13,1,9);
波段法则副图
A:=MAX(MA(C,13),MA(C,34));
B:=MIN(MA(C,13),MA(C,34));
绿买:C>A,COLORGREEN;
红停:C<B,COLORRED;
黄观望:A>=C AND C>=B,COLORYELLOW ;
STICKLINE(C>A,0,2,8,0),COLOR008800,LINETHICK2;
STICKLINE(C<B,0,2,8,0),COLORRED,LINETHICK2;
STICKLINE(A>=C AND C>=B,0,2,8,0),COLORYELLOW,LINETHICK2;
波段强度副图
短线强度:ATAN((MA(CLOSE,13)/REF(MA(CLOSE,13),1)-1)*100)*57.299999,NODRAW;
X_1:=ATAN((MA(CLOSE,5)/REF(MA(CLOSE,5),1)-1)*100)*57.299999;
X_2:=ATAN((MA(CLOSE,20)/REF(MA(CLOSE,20),1)-1)*100)*57.299999;
X_3:=ATAN((MA(CLOSE,60)/REF(MA(CLOSE,60),1)-1)*100)*57.299999;
X_4:=X_1/50+短线强度/40+X_2/21+X_3/10;
STICKLINE(短线强度>0,短线强度/8,0,2.6,0),COLORYELLOW;
STICKLINE(短线强度>40,短线强度/8,4.2,2.6,0),COLORRED;
主升行情:X_4,COLORLIRED,LINETHICK2;
IF(X_4>4.2 AND X_4>=REF(X_4,1),X_4,DRAWNULL),COLORMAGENTA,LINETHICK2;
0,DOTLINE;