DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
M5F:=MA(C,4);
M8:=MA(C,8),COLORRED,LINETHICK2;
M20:=MA(C,20);
M30:=MA(C,30);
M60:=MA(C,60),COLORBLUE,LINETHICK2;
D3:=MIN(MIN(M5F,M8),M20)>M60;
LLM:=LLV(MACD*100,200);
HHM:=HHV(MACD*100,200);
WYZB1:=C>REF(C,1)*1.05;
T:=BARSLAST(C>REF(C,1)*1.095 AND C=H);
WYZB2:=BARSLAST(C< REF(C,1)*1.095 AND C>REF(C,1)*1.08);
WYZB3:=BARSLAST(C< REF(C,1)*1.08 AND C>REF(C,1)*1.07);
WYZB4:=BARSLAST(C< REF(C,1)*1.07 AND C>REF(C,1)*1.06);
WYZB5:=BARSLAST(C< REF(C,1)*1.06 AND C>REF(C,1)*1.05);
WYZB6:=REF(T,1)>100 AND REF(WYZB2,1)>100 AND REF(WYZB3,1)>100 AND REF(WYZB4,1)>100 AND REF(WYZB5,1)>80 AND WYZB1;
WYZB7:=BARSLAST(WYZB6 AND HHM< 60 AND LLM>-55);
WYZB8:=REF(HHV(H,100),3);
D6:=BARSSINCEN(MIN(MIN(M5F,M8),M20)>M60,WYZB7+1);
XGX:=CROSS((WYZB7=0 AND D3) OR D6=0,0.5);
WYZB9:=COUNT(XGX,30)=2 AND XGX;
WYZB10:=REF(HIGH,10)=HHV(HIGH,2*10+1);
WYZB11:=FILTER(WYZB10,10);
WYZB12:=REF(WYZB11,10+1);
HDF:=REF(WYZB12,10);
前高:=REF(H,BARSLAST(HDF));
倍量:=VOL/REF(VOL,1)>=1.9;
突破前高:=CROSS(C,前高);
YG:= 倍量 AND 突破前高;
低2:=IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,LLV(L, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL);
SJ:=BARSLAST(YG);
H300:=HHVBARS(DIF,300);
BOLL:=MA(CLOSE,20);
AL:=BOLL+2*STD(CLOSE,20);
TQ:=BARSLAST(CROSS(AL>=REF(AL,1),0.5));
E25:=EXPMA(C,25);
ZDZ:=REFDATE(WYZB8,DATE);
ZF:=EVERY(RANGE(C/REF(C,1),0.97,1.05),TQ+1);
ZFF:=(HHV(H,TQ+1)-LLV(L,TQ+1))/LLV(L,TQ+1)*100;
TJQ:=EVERY(MAX(C,O)/AL< 1.02 ,TQ+1);
XL:=(ATAN((E25/REF(E25,TQ)-1)*100)*180/3.1415926);
DJ:=REF(LLV(L,100),3);
TJ1Q:=CROSS(DIF>=REF(DIF,H300),0.5) AND ZFF< 17 AND ZF AND TJQ;
躁动:=TJ1Q AND XL>75;
A1F:=REF(C,1);
WYZB13:=REF(C,10);
WYZB14:=(WYZB13-A1F)/A1F*100;
WYZB15:=(WYZB14-REF(WYZB14,1));
选股1:=CROSS(WYZB6,9.8);
WYZB16:=REF(V,1);
WYZB17:=IF(VOL>0.001,1,EXP(ABS(LOG(VOL*100))))>2;
WYZB18:=WYZB17/WYZB16;
WYZB19:=(WYZB18-REF(WYZB18,1));
选股2:=CROSS(WYZB19,500);
潜伏2:=选股1 AND 选股2;
GX:=潜伏2 OR 躁动 OR CURRBARSCOUNT=CONST(SJ)+2 OR WYZB9 OR (CCI<=100 AND L<=低2);
YF:=FILTER(GX=1,3);
WYGS1:=BARSCOUNT(C);
AH:=HHV(H,200);
A1L:=LLV(L,200);
A0:=(AH-A1L)/190;
B1F:=L-A0;
LC:=REF(CLOSE,1);
Z1:=SMA(MAX(CLOSE-LC,0),10,1)/SMA(ABS(CLOSE-LC),10,1)*100;
WYGS2:=REF(LOW,1);
XH:=H=ZDZ;
WYGS3:=SMA(ABS(LOW-WYGS2),13,1)/SMA(MAX(LOW-WYGS2,0),13,1)*100;
WYGS4:=EMA(IF(CLOSE*1.2,WYGS3*13,WYGS3/13),13);
WYGS5:=LLV(LOW,34);
WYGS6:=HHV(WYGS4,34);
WYGS7:=IF(LLV(LOW,56),1,0);
WYGS8:=EMA(IF(LOW<=WYGS5,(WYGS4+WYGS6*2)/2,0),3)/618*WYGS7;
AA:=WYGS8>REF(WYGS8,1);
DR:=100;
ZRQ:=3;
ZD:=REFDATE(DJ,DATE);
ZZ:=L=ZD;
XGA:=AA AND ZZ,COLORRED,LINETHICK2;
XG1:=XGA>REF(XGA,1);
ZT:=XG1>REF(XG1,1)COLORRED,LINETHICK2;
MA1:=MA(C,1),COLORFFFF00,NODRAW;
MA30:=MA(C,30),COLORFFFF00,NODRAW;
WYYM1:=3*MA30-2*MA1,COLOR888888;
WYYM2:=2.8*MA30-1.8*MA1,COLOR777777;
WYYM3:=2.6*MA30-1.6*MA1,COLOR666666;
WYYM4:=2.4*MA30-1.4*MA1,COLOR656565;
WYYM5:=2.2*MA30-1.2*MA1,COLOR555555;
WYYM6:=2*MA30-1*MA1,COLOR454545;
WYYM8:=1.8*MA30-0.8*MA1,COLOR444444;
WYYM9:=1.6*MA30-0.6*MA1,COLOR353535;
WYYM10:=1.4*MA30-0.4*MA1,COLOR333333;
A1:=1.1*MA30-0.1*MA1,COLOR353535,LINETHICK1;
MMV:=EMA(((SLOPE(CLOSE,22) * 20) + CLOSE),55);
MM:=(IF(((PERIOD > 5) AND (PERIOD < 9)),MA(MMV,1),IF((PERIOD = 5), MA(MMV,4),IF((PERIOD = 4),MA(MMV,8),IF((PERIOD = 3),MA(MMV,16), IF((PERIOD = 2),MA(MMV,32),0))))) );
SSL:=EMA(CLOSE,3);
X_1:=(C+0.809*H+0.618*L+O/2)/2.927;
MA_5:=MA(X_1,5),LINETHICK3;
WYYM11:=SMA(C,5,1);
WYYM12:=DMA(WYYM11,VOL/SUM(VOL,COUNT(C>0,0))*100);
WYYM13:=SMA(WYYM12,3,1) ;
WYYM14:=SMA(WYYM12,5,1);
WYYM15:=SMA(WYYM12,7,1);
WYYM16:=SMA(WYYM12,9,1);
WYYM17:=SMA(WYYM12,11,1);
IF(WYYM13< REF(WYYM13,1),WYYM13,DRAWNULL),POINTDOT,COLORFFAA11;
IF(WYYM14< REF(WYYM14,1),WYYM14,DRAWNULL),POINTDOT,COLORFFBB33;
IF(WYYM15< REF(WYYM15,1),WYYM15,DRAWNULL),POINTDOT,COLORFFCC55;
IF(WYYM16< REF(WYYM16,1),WYYM16,DRAWNULL),POINTDOT,COLORFFDD66;
IF(WYYM17< REF(WYYM17,1),WYYM17,DRAWNULL),POINTDOT,COLORFFEE55;
IF(WYYM13>REF(WYYM13,1),WYYM13,DRAWNULL),POINTDOT,COLORFF00FF;
IF(WYYM14>REF(WYYM14,1),WYYM14,DRAWNULL),POINTDOT,COLORFF99FF;
IF(WYYM15>REF(WYYM15,1),WYYM15,DRAWNULL),POINTDOT,COLORFF66FF;
IF(WYYM16>REF(WYYM16,1),WYYM16,DRAWNULL),POINTDOT,COLORFF33FF;
IF(WYYM17>REF(WYYM17,1),WYYM17,DRAWNULL),POINTDOT,COLORFF66FF;
吾:(3*MA_5+2*REF(MA_5,1)+REF(MA_5,2))/(1+2+3),COLOR00AA00,LINETHICK1;
友:(5*MA_5+4*REF(MA_5,1)+3*REF(MA_5,2)+2*REF(MA_5,3)+REF(MA_5,4))/(5+4+3+2+1),COLOR00BB00,LINETHICK1;
指:(7*MA_5+6*REF(MA_5,1)+5*REF(MA_5,2)+4*REF(MA_5,3)+3*REF(MA_5,4)+2*REF(MA_5,5)+REF(MA_5,6))/(7+6+5+4+3+2+1),COLOR00CC00,LINETHICK1;
标:(9*MA_5+8*REF(MA_5,1)+7*REF(MA_5,2)+6*REF(MA_5,3)+5*REF(MA_5,4)+4*REF(MA_5,5)+3*REF(MA_5,6)+2*REF(MA_5,7)+REF(MA_5,8))/(9+8+7+6+5+4+3+2+1),COLOR00DD00,LINETHICK1;
网:(11*MA_5+10*REF(MA_5,1)+9*REF(MA_5,2)+8*REF(MA_5,3)+7*REF(MA_5,4)+6*REF(MA_5,5)+5*REF(MA_5,6)+4*REF(MA_5,7)+3*REF(MA_5,8)+2*REF(MA_5,9)+REF(MA_5,10))/(11+10+9+8+7+6+5+4+3+2+1),COLOR00EE00,LINETHICK1;
IF(吾>REF(吾,1),吾,DRAWNULL),COLOR0000AA,LINETHICK1;
IF(友>REF(友,1),友,DRAWNULL),COLOR0000BB,LINETHICK1;
IF(指>REF(指,1),指,DRAWNULL),COLOR0000CC,LINETHICK1;
IF(标>REF(标,1),标,DRAWNULL),COLOR0000DD,LINETHICK1;
IF(网>REF(网,1),网,DRAWNULL),COLOR0000EE,LINETHICK1;
STICKLINE(CLOSE>OPEN OR CLOSE=OPEN AND CLOSE>REF(CLOSE,1),LOW,HIGH,0,0),COLORRED;
STICKLINE(CLOSE>OPEN OR CLOSE=OPEN AND CLOSE>REF(CLOSE,1),OPEN,CLOSE,3,0),COLORRED;
STICKLINE(CLOSE< OPEN OR CLOSE=OPEN AND CLOSE<=REF(CLOSE,1),LOW,HIGH,0,0),COLORFFFF00;
STICKLINE(CLOSE< OPEN OR CLOSE=OPEN AND CLOSE<=REF(CLOSE,1),OPEN,CLOSE,3,0),COLORFFFF00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0,0 ),COLORFFFF00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3,0 ),COLORFFFF00;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0,1) ,COLORRED;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,1) ,COLORRED;
DRAWTEXT(CROSS(Z1,20),L*0.998,'底'),COLORRED;
DRAWTEXT(CROSS(80,Z1),H*1.008,'顶'),COLORGREEN;
DRAWTEXT(ZT,H,'起爆'),COLORLIRED;
DRAWTEXT(XH,H,'到顶'),COLORGREEN;
MA2:=MA(CLOSE,10);
MA3:=MA(CLOSE,20);
MWYYM10:=MA(CLOSE,30);
MWYYM9:=MA(CLOSE,60);
ZTABC:=1.1;
N:=20;
TK:=O>REF(H,1);
MA5:=MA(C,5);
MWYYM6:=MA(C,10);
MWYYM1:=MA(C,20);
MA_UP:=MA5>MWYYM6 AND MWYYM6>MWYYM1 AND MA5>REF(MA5,1) AND MWYYM6>REF(MWYYM6,1) AND MWYYM1>REF(MWYYM1,1);
HAVE_ZT_20DAYS:=COUNT(ZT,N)>0;
VOLSE:=V>REF(V,1);
HSSE:=V/CAPITAL*100>REF(V/CAPITAL*100,1);
MART:=VOLSE AND HSSE;
FILTER_MAIN:=HAVE_ZT_20DAYS AND TK AND MA_UP AND MART;
STICKLINE(FILTER_MAIN AND C>O,O,C,2,0),COLORRED;
DRAWTEXT(FILTER_MAIN AND C>O ,LOW,'龙头确认'),COLORMAGENTA;
DRAWICON(FILTER_MAIN AND C>O,L,9);