
主图
Z1:=STRCAT(DYBLOCK,' ');
Z2:=STRCAT(Z1,HYBLOCK);
Z3:=STRCAT(Z2,' ');
Z4:=STRCAT(Z3,GNBLOCK);
Z5:=STRCAT(Z4,' ');
Z6:=STRCAT(Z5,FGBLOCK);
DRAWTEXT_FIX(ISLASTBAR,0.23,0.012,0,STRCAT(Z6,ZHBLOCK)),COLORFF8080;
DRAWTEXT_FIX(1,0.23,0.099,0,STRCAT('【自定板块】:',ZDBLOCK)),COLORGRAY;
{DRAWTEXT_FIX(1,0.23,0.19,0,'解禁日期:')COLORGREEN;}
DRAWTEXT_FIX(1,0.28,0.19,0,EXTERNSTR(0,9)),COLOR00FF00,LINETHICK2;
{灰色K线}
STICKLINE(O>=C,H,L,0,0),COLOR909090;
STICKLINE(O>=C,C,O,3.1,0),COLOR606060;
STICKLINE(O>=C,C,O,2.1,0),COLOR707070;
STICKLINE(O>=C,C,O,1.2,0),COLOR808080;
STICKLINE(O>=C,C,O,0.2,0),COLOR909090;
STICKLINE(O<=C,H,L,0,0),COLOR666B6F;
STICKLINE(C>O,C,O,3.1,1),COLOR666B6F;
V2V:=V/REF(V,1)>=1.9 AND C>REF(C,1);
YK:=MA("KDJ.K#MONTH"(9,3,3),20);
YD:=MA("KDJ.D#MONTH"(9,3,3),20);
YJ:=MA("KDJ.J#MONTH"(9,3,3),20);
ZK:=MA("KDJ.K#WEEK"(9,3,3) ,5);
ZD:=MA("KDJ.D#WEEK"(9,3,3) ,5);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1),LINETHICK0;
D:=SMA(K,3,1),LINETHICK0;
J:=3*K-2*D,LINETHICK0;
RJC:DRAWICON(CROSS(K,D),L*0.995,0);
{DRAWTEXT(RJC,L*0.98,'日金叉'),COLOR0000FF;
RSC:DRAWICON(CROSS(D,K),H*1.03,2),;
DRAWTEXT(RSC,H*1.03,'日死叉'),COLORFFFFFF;}
ZJC: DRAWICON (CROSS(ZK,ZD), L*0.995,0);
DRAWTEXT(ZJC,L*0.96,'↖K周金'),COLORFF00FF;
ZSC: DRAWICON (CROSS(ZD,ZK), H*1.01,0),;
DRAWTEXT(ZSC,H*1.01,'↙'),COLOR00FFFF;
YJC: DRAWICON (CROSS(YK,YD), L*0.995,0);
DRAWTEXT(YJC,L*0.99,'↖K月金'),COLOR0000FF;
YSC: DRAWICON (CROSS(YD,YK), H*1.01,0);
DRAWTEXT(YSC,H*1.01,'↙'),COLORADEAEA;
E24:EMA(C,24),COLORRED,LINETHICK2;
IF(E24<REF(E24,1),E24,DRAWNULL),COLORGREEN,LINETHICK2;
E55:EMA(C,55),COLORFF00FF,LINETHICK1;
IF(E55<REF(E55,1),E55,DRAWNULL),COLORGREEN,LINETHICK1;
E77:EMA(C,77),COLORFFFF00,LINETHICK1;
IF(E77<REF(E77,1),E77,DRAWNULL),COLORGREEN,LINETHICK1;
DIFW:="MACD.DIF#WEEK"(12,26,9);
DEAW:="MACD.DEA#WEEK"(12,26,9);
XA:=FILTER(CROSS(DIFW,DEAW) AND REF(DEAW,1)<0,13),COLORMAGENTA;
STICKLINE(XA,H,L,0,1),COLORGREEN;
STICKLINE(XA,C,O,3,0),,COLOR005500;
STICKLINE(XA,C,O,2.8,0),COLOR006600;
STICKLINE(XA,C,O,2.5,0),COLOR007700;
STICKLINE(XA,C,O,2.2,0),COLOR008800;
STICKLINE(XA,C,O,1.7,0),COLOR009900;
STICKLINE(XA,C,O,1.2,0),COLOR00AA00;
STICKLINE(XA,C,O,0.7,0),COLOR00CC00;
STICKLINE(XA,C,O,0.2,0),COLOR00FF00;
DRAWTEXT(XA,L*0.97,'↖-M周金'),COLOR00FF00;
STICKLINE(ZSC,C,O,3.2,0),COLOR117777;
STICKLINE(ZSC,C,O,2.6,0),COLOR119999;
STICKLINE(ZSC,C,O,1.9,0),COLOR11BBBB;
STICKLINE(ZSC,C,O,1.1,0),COLOR11DDDD;
STICKLINE(ZSC,C,O,0.3,0),COLOR44FFFF;
STICKLINE(ZJC,C,O,3.2,0),COLOR880088;
STICKLINE(ZJC,C,O,2.6,0),COLORAA00AA;
STICKLINE(ZJC,C,O,1.9,0),COLORCC00CC;
STICKLINE(ZJC,C,O,1.1,0),COLOREE00EE;
STICKLINE(YJC,C,O,3,0),COLOR009900;
STICKLINE(YJC,C,O,2,0),COLOR00BB00;
STICKLINE(YJC,C,O,1,0),COLOR00DD00;
STICKLINE(YJC,C,O,0.3,0),COLOR00FF00;
九啸启动波段副图
X_1:=IF(NAMELIKE(4),0,1);
X_2:=IF(NAMELIKE(5),0,1);
X_3:=DYNAINFO(17)>0;
X_4:=X_1 AND X_2 AND X_3;
X_5:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;
X_6:=SMA(X_5,8,1);
X_7:=SMA(X_6,8,1);
X_8:=3*X_6-2*X_7;
X_9:=(CLOSE-MA(CLOSE,7))/MA(CLOSE,7)*100;
X_10:=(CLOSE-MA(CLOSE,14))/MA(CLOSE,14)*100;
X_11:=(CLOSE-MA(CLOSE,28))/MA(CLOSE,28)*100;
X_12:=VOL*10000/FINANCE(7);
X_13:=CLOSE>REF(CLOSE*1.096,1);
X_14:=NOT(X_13);
X_15:=LLV(LOW,10);
X_16:=HHV(HIGH,25);
X_17:=EMA((CLOSE-X_15)/(X_16-X_15)*4,4);
X_18:=(CLOSE-MA(CLOSE,21))/MA(CLOSE,21)*18+1.2;
X_19:=25;
X_20:=SUM(IF(HIGH>REF(HIGH,7),HIGH-REF(HIGH,7),0),X_19);
X_21:=SUM(IF(LOW>REF(LOW,35),0,REF(LOW,35)-LOW),X_19);
X_22:=X_20/(X_20+X_21)*5.8-1.4;
X_23:=LLV(LOW,10);
X_24:=HHV(HIGH,30);
X_25:=MEMA((CLOSE-X_23)/(X_24-X_23)*9-1.4,13);
X_26:=(2*CLOSE+HIGH+LOW)/4;
X_27:=LLV(LOW,35);
X_28:=HHV(HIGH,15);
X_29:=EMA((X_26-X_27)/(X_28-X_27)*100,25);
X_30:=EMA(0.667*REF(X_29,1)+0.333*X_29,2)*0.09-2.7;
X_31:=EMA(CLOSE,8);
X_32:=EMA(X_31,20);
X_33:=CROSS(X_31,X_32);
X_34:=X_31<EMA(CLOSE,120);
X_35:=EMA(SMA((CLOSE-LLV(LOW,14))/(HHV(HIGH,14)-LLV(LOW,14))*100,5,1),3);
X_36:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
X_37:=EMA(X_36,30);
X_38:=EMA(X_37,30);
X_39:=3*X_37-2*X_38;
X_40:=EMA(X_39,5);
X_41:=LLV(LOW,10);
X_42:=HHV(HIGH,25);
X_43:=EMA((CLOSE-X_41)/(X_42-X_41)*5,4);
X_44:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>4.5 AND CLOSE=HIGH OR ((CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>5 AND CLOSE>HIGH*0.988) OR ((CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>6.3 AND CLOSE>HIGH*0.98) AND X_7<18 AND DBQR.ZS>0.72 AND (CLOSE-REF(CLOSE,250))/REF(CLOSE,250)*100<60 AND CLOSE>OPEN AND ((CLOSE-REF(CLOSE,5))/REF(CLOSE,5)*100>4 OR ((CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>8.1 AND CLOSE>HIGH*0.988));
X_45:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>4.8 AND X_7<18 AND DBQR.ZS>0.72 AND (CLOSE-REF(CLOSE,250))/REF(CLOSE,250)*100<60 AND CLOSE>OPEN AND (CLOSE-REF(CLOSE,4))/REF(CLOSE,4)*100>0 AND (CLOSE-REF(CLOSE,5))/REF(CLOSE,5)*100>0 AND (CLOSE-REF(CLOSE,8))/REF(CLOSE,8)*100>0 AND (CLOSE-REF(CLOSE,13))/REF(CLOSE,13)*100>0 AND (CLOSE-REF(CLOSE,25))/REF(CLOSE,25)*100>0 AND (CLOSE-REF(CLOSE,13))/REF(CLOSE,13)*100<13 AND CLOSE>HIGH*0.984;
九啸启动:X_17<0.45 OR X_7<9 OR (X_8<0 AND X_7<12) OR (X_8<(-5) AND X_7<15) OR (X_35<(-0.38) AND X_17<=0.4) OR X_35<(-0.48) AND X_17<=0.39 AND X_7<25 OR X_17<0.4 OR X_11<(-24) AND X_11<(-18) AND (CLOSE-REF(CLOSE,2))/REF(CLOSE,2)*100>(-3) AND ((CLOSE-REF(CLOSE,2))/REF(CLOSE,2)*100>2 OR (CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>5) AND CLOSE>OPEN AND DBQR.ZS>0.72 OR X_44 AND (CLOSE-REF(CLOSE,5))/REF(CLOSE,5)*100<18 AND (CLOSE-REF(CLOSE,6))/REF(CLOSE,6)*100<15 AND (CLOSE-REF(CLOSE,10))/REF(CLOSE,10)*100<13 AND (CLOSE-REF(CLOSE,13))/REF(CLOSE,13)*100<13 AND (CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>3.6 AND (DBQR.ZS>3 OR (CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>7.8) OR X_45 AND DBQR.ZS<13,COLORYELLOW,LINETHICK2;
九啸振幅副图
振幅:((H-L)/REF(C,1))*100,COLORRED,NODRAW;
振幅2:STICKLINE(振幅<2,0,振幅,2,0)COLORBLUE;
振幅2至3:STICKLINE(3>振幅 AND 振幅>=2,0,振幅,2,0)COLORBLUE;
STICKLINE(3>振幅 AND 振幅>=2,0,2,2,0)COLORBLUE;
振幅3至5:STICKLINE(5>振幅 AND 振幅>=3,0,振幅,2,0)COLORYELLOW;
STICKLINE(5>振幅 AND 振幅>=3,2,3,2,0)COLORBLUE;
STICKLINE(5>振幅 AND 振幅>=3,0,2,2,0)COLORBLUE;
振幅5至10:STICKLINE(10>振幅 AND 振幅>=5,0,振幅,2,0)COLORMAGENTA;
STICKLINE(10>振幅 AND 振幅>=5,3,5,2,0)COLORYELLOW;
STICKLINE(10>振幅 AND 振幅>=5,2,3,2,0)COLORBLUE;
STICKLINE(10>振幅 AND 振幅>=5,0,2,2,0)COLORBLUE;
振幅大于10:STICKLINE(振幅>=10,0,振幅,2,0)COLOR0000FF;
STICKLINE(振幅>=10,5,10,2,0)COLORMAGENTA;
STICKLINE(振幅>=10,3,5,2,0)COLORYELLOW;
STICKLINE(振幅>=10,2,3,2,0)COLORBLUE;
STICKLINE(振幅>=10,0,2,2,0)COLORBLUE;
3;5;10;
九啸倍量副图
TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,TOTALFZNUM,1)))));
MTIME:=MOD(FROMOPEN,TOTAL);
CTIME:=IF(MTIME<0.5,TOTAL,MTIME);
{倍量柱}
VVOL:IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,VVOL,0,-1,-1),COLOR00C0C0;
VOLUME:VOL,VOLSTICK;
AA:=VOL>REF(V,1)*1.9;{倍量}
{AA1:=VOL<REF(LLV(VOL,13),1);}
AA1:=V/REF(V,1)<=0.6;{缩倍量}
STICKLINE(AA,0,V,2,0),COLORYELLOW;
STICKLINE(AA1,0,V,2,0),COLOR1D7300;
MV5:MA(V,5)COLORYELLOW;
MV35:MA(V,35)COLORMAGENTA;{启动}
MV135:MA(V,135)COLOR1D7300;{异动}
DRAWICON(CROSS(MV5,MV135),MV5,1); {5日上穿135日做记号};
九啸MACD副图
获利比例:WINNER(CLOSE)*100,NODRAW,COLORYELLOW;
筹码集中度:(COST(95)-COST(5))/(COST(95)+COST(5))*100,NODRAW;DIF:MACD.DIF,COLORLIGRAY;
DEA:MACD.DEA,COLORYELLOW;
强度:IF(DIF>DEA,DIF,DRAWNULL),COLORRED;
强度1:IF(DEA<DIF,DEA,DRAWNULL),COLORMAGENTA;
{}
MACD:(DIF-DEA)*2,COLORSTICK;
MACD2:=MACD;
MJ:=MACD;
S05:=SUM(MJ,0);
QST:=BARSLAST(MJ<0 AND REF(MJ,1)>0)+1;
QXT:=BARSLAST(MJ>0 AND REF(MJ,1)<0)+1;
S5:=IF(MJ>0,S05-REF(S05,BARSLAST(MJ<0)),S05-REF(S05,BARSLAST(MJ>0)))/10;
ST:=IF(MJ>0,REF(QST,QXT)+QXT,REF(QXT,QST)+QST);
RS5:=REF(S5,ST);
低位金叉:=CROSS(DIF,DEA) AND DIF<-0.1;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
DRAWICON(二次金叉,0,25);
三次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=3,60)=1;
DRAWICON(三次金叉,0,26);
A002:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A002+1)>CLOSE AND DIF>REF(DIF,A002+1) AND CROSS(DIF,DEA);
DRAWICON(LONGCROSS(CLOSE,MA(CLOSE,5),17),MACD2,1);
DRAWTEXT(二次金叉>低位金叉,DIF,'金2'),COLORRED;
{RSI买卖点-不需要的可以屏蔽}
C81:=REF(C,1);
RN:=9;
RSI1:=SMA(MAX(C-C81,0),RN,1)/SMA(ABS(C-C81),RN,1)*100;
低点:=CROSS(RSI1,20);
STICKLINE(低点,0.1,0,0.3,0),COLORYELLOW;
DRAWICON(低点, 0.15,1);
DRAWTEXT(低点, 0.14,'←底'),COLORYELLOW;
顶:=CROSS(80,RSI1);
DRAWICON(顶, DIF*1.15,2);
DRAWTEXT(顶, DIF*1.1,'←减/清仓'),COLORGREEN;
死叉:=CROSS(DEA,DIF);
N1:=BARSLAST(死叉),NODRAW;{最近一次死叉的位置}
N2:=REF(BARSLAST(死叉),N1+1),NODRAW;{倒数第二次死叉与倒数第一次死叉的区间}
N3:=REF(BARSLAST(死叉),N2+N1+2),NODRAW;{倒数第三次死叉与倒数第二次死叉的区间}
CL1:=LLV(C,N1+1),NODRAW;{最近一次死叉后,最低收盘价}
DIFL1:=LLV(DIF,N1+1),NODRAW;
CL2:=REF(CL1,N1+1),NODRAW;{倒数第二次死叉与倒数第一次死叉之间的最低收盘价}
DIFL2:=REF(DIFL1,N1+1),NODRAW;
CL3:=REF(CL2,N1+1),NODRAW;{倒数第三次死叉与倒数第二次死叉之间的最低收盘价}
DIFL3:=REF(DIFL2,N1+1),NODRAW;
PDIFL2:=IF(DIFL2>0,INTPART(LOG(DIFL2))-1,INTPART(LOG(-DIFL2))-1);
MDIFL2:=INTPART(DIFL2/POW(10,PDIFL2));
PDIFL3:=IF(DIFL3>0,INTPART(LOG(DIFL3))-1,INTPART(LOG(-DIFL3))-1);
MDIFL3:=INTPART(DIFL3/POW(10,PDIFL3));
MDIFB2:=INTPART(DIF/POW(10,PDIFL2));
MDIFB3:=INTPART(DIF/POW(10,PDIFL3));
直接底背离:=(CL1<CL2 ) AND (MDIFB2>MDIFL2) AND (MACD<0 AND REF(MACD,1)<0) AND MDIFB2<=REF(MDIFB2,1);
隔峰底背离:=(CL1<CL3 AND CL3<CL2 ) AND (MDIFB3>MDIFL3) AND (MACD<0 AND REF(MACD,1)<0) AND MDIFB3<=REF(MDIFB3,1);
B6:直接底背离 OR 隔峰底背离,NODRAW;
BG:((MDIFB2>REF(MDIFB2,1))*REF(直接底背离,1)) OR ((MDIFB3>REF(MDIFB3,1))*REF(隔峰底背离,1)),NODRAW;
底背离消失:=(REF(直接底背离,1) AND DIFL1<=DIFL2 ) OR (REF(隔峰底背离,1) AND DIFL1<=DIFL3);
DRAWTEXT(TFILTER(B6,MACD>0,1),(DIF+MACD),'钝化'),COLORRED;
STICKLINE(B6 OR BG,DIF,DEA,1,-1),COLORRED;
DRAWTEXT(TFILTER(底背离消失,B6,1),(DIF+MACD),'消失'),COLORYELLOW;
DRAWTEXT(TFILTER(BG,MACD>0,1),DIF*1.1,'M底背'),COLORMAGENTA;
金叉:=CROSS(DIF,DEA);
M1:=BARSLAST(金叉),NODRAW;{最近一次金叉的位置}
M2:=REF(BARSLAST(金叉),M1+1),NODRAW;{倒数第二次金叉与倒数第一次金叉的区间}
M3:=REF(BARSLAST(金叉),M2+M1+2),NODRAW;{倒数第三次金叉与倒数第二次金叉的区间}
CH1:=HHV(C,M1+1),NODRAW;{最近一次金叉后,最高收盘价}
DIFH1:=HHV(DIF,M1+1),NODRAW;
CH2:=REF(CH1,M1+1),NODRAW;{倒数第二次金叉与倒数第一次金叉之间的最高收盘价}
DIFH2:=REF(DIFH1,M1+1),NODRAW;
CH3:=REF(CH2,M1+1),NODRAW;{倒数第三次金叉与倒数第二次金叉之间的最高收盘价}
DIFH3:=REF(DIFH2,M1+1),NODRAW;
PDIFH2:=IF(DIFH2>0,INTPART(LOG(DIFH2))-1,INTPART(LOG(-DIFH2))-1);
MDIFH2:=INTPART(DIFH2/POW(10,PDIFH2));
PDIFH3:=IF(DIFH3>0,INTPART(LOG(DIFH3))-1,INTPART(LOG(-DIFH3))-1);
MDIFH3:=INTPART(DIFH3/POW(10,PDIFH3));
MDIFT2:=INTPART(DIF/POW(10,PDIFH2));
MDIFT3:=INTPART(DIF/POW(10,PDIFH3));
直接顶背离:=(CH1>CH2 ) AND (MDIFT2<MDIFH2) AND (MACD>0 AND REF(MACD,1)>0) AND MDIFT2>=REF(MDIFT2,1);
隔峰顶背离:=(CH1>CH3 AND CH3>CH2 ) AND (MDIFT3<MDIFH3) AND (MACD>0 AND REF(MACD,1)>0) AND MDIFT3>=REF(MDIFT3,1);
T6:直接顶背离 OR 隔峰顶背离,NODRAW;
TG:((MDIFT2<REF(MDIFT2,1))*REF(直接顶背离,1)) OR ((MDIFT3<REF(MDIFT3,1))*REF(隔峰顶背离,1)),NODRAW;
顶背离消失:=(REF(直接顶背离,1) AND DIFH1>=DIFH2 ) OR (REF(隔峰顶背离,1) AND DIFH1>=DIFH3);
DRAWTEXT(TFILTER(T6,MACD<0,1),(DIF+MACD),'钝化'),COLORGREEN;
DRAWTEXT(TFILTER(顶背离消失,T6,1),(DIF+MACD),'消失'),COLORYELLOW;
STICKLINE(T6 OR TG,DIF,DEA,1,-1),COLORLIGREEN;
DRAWTEXT(TFILTER(TG,MACD<0,1),DIF*1.02,'M顶背'),COLORMAGENTA;
{}
{};
TRR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),14);
HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
PDM:= SUM(IF(HD>0 AND HD>LD,HD,0),14);
MDM:= SUM(IF(LD>0 AND LD>HD,LD,0),14);
PDI:= PDM*100/TRR;
MDI:= MDM*100/TRR;
A1:=BARSLAST(REF(CROSS("MACD.DIF"(12,26,9),"MACD.DEA"(12,26,9)),1));
B1:=REF(C,A1+1)>C AND REF("MACD.DIF"(12,26,9),A1+1)<"MACD.DIF"(12,26,9) AND CROSS("MACD.DIF"(12,26,9),"MACD.DEA"(12,26,9));
A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
C1:=BARSLAST(REF(CROSS("MACD.DEA"(12,26,9),"MACD.DIF"(12,26,9)),1));
D1:=REF(C,C1+1)<C AND REF("MACD.DIF"(12,26,9),C1+1)>"MACD.DIF"(12,26,9) AND CROSS("MACD.DEA"(12,26,9),"MACD.DIF"(12,26,9));
C2:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K"(9,3,3),C2+1)>"KDJ.K"(9,3,3) AND CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));
C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1",C3+1)>"RSI.RSI1"
AND CROSS("RSI.RSI2","RSI.RSI1");
DRAWTEXT(B2>0,DIF*1.2,'K底'),COLORFF00FF;
DRAWTEXT(D2>0,DIF*1.2,'K顶'),COLORFFCC66;
DRAWTEXT(B3>0,DIF*1,'R底'),COLORYELLOW;
DRAWTEXT(D3>0,DIF*1,'R顶'),COLORFFFFFF;
TDJ1:=(H-L)/REF(C,1)>0.05;
YUL1:=COUNT(TDJ1,5)>1;
TU1:=CLOSE/MA(C,40)<0.74;
启动1:=TDJ1 AND YUL1 AND TU1;
ZC:=REF(CLOSE,1);
VAR1:=SMA(MAX(CLOSE-ZC,0),7,1)/SMA(ABS(CLOSE-ZC),7,1)*100;
VAR2:=((MA(C,30)-LOW)/MA(C,60))*200;
GL1:=FILTER(REF(VAR1,1)<20 AND VAR1>REF(VAR1,1),5);
波段1:=FILTER(GL1 AND REF(启动1,1) AND VAR2>20 AND C>REF(C,1),10);
MA5:=EMA(C,5);
EM5:=EMA(MA5,5);
VAR3:=ABS(MA5-EM5);
VAR4:=MA5-REF(MA5,1);
VAR5:=VAR4-REF(VAR4,1);
VAR6:=(VAR4+VAR5)/2;
TDF1:=POW(VAR3,1)*POW(VAR6,3);
NTDF1:=TDF1/HHV(ABS(TDF1),15);
确定1:=波段1 AND CROSS(NTDF1,-0.05);
选股1:=FILTER(REF(启动1,1) AND (确定1 OR C>REF(C,1)) AND "MACD.MACD"(12,26,9)>-1.5,10);
卧底1:(COUNT(选股1,13)>=1 AND (波段1 OR 确定1))*0.4,COLORRED;
DRAWTEXT(卧底1=0.4,0.3,'←卧底'),COLORRED;
九啸底部副图
V1:=(HIGH+OPEN+LOW+(2)*(CLOSE))/(5);
V2:=REF(V1,1);
V3:=MAX(V1-V2,0);
V4:=ABS(V1-V2);
V5:=SMA(V3,10,1);
V6:=SMA(V4,10,1);
V8:=COUNT(((V5)/(V6)<0.2),5);
V9:=COUNT((LLV(V1,10)=V1),10);
九啸底部:IF((V8>=1) AND (V9>=1) AND (CLOSE>OPEN) AND (REF(CLOSE,1)>REF(OPEN,1)) AND (VOL>REF(VOL,1)),1,0),COLOR00FFFF;
EXIST(九啸底部,3),COLORMAGENTA;