DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),14);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),14);
多头线:=DMP*100/MTR,LINETHICK2,COLORRED;
空头线:=DMM*100/MTR,LINETHICK2,COLORYELLOW;
快助长线:=EXPMEMA(ABS(空头线-多头线)/(空头线+多头线)*100,6);
慢助长线:=EXPMEMA(快助长线,6);
Z_J1:=EMA(C,2)-EMA(C,150);
Z_J2:=EMA(Z_J1,100);
Z_J3:=2*(Z_J1-Z_J2);
Z_J4:=POW(Z_J3,3)*0.1+POW(Z_J3,1);
G_J1:=EMA(C,2)-EMA(C,89);
G_J2:=EMA(G_J1,30);
G_J3:=2*(G_J1-G_J2)*9.8;
G_J4:=POW(G_J3,3)*0.1+POW(G_J3,2);
攻击资金:=IF(G_J3>0.015,G_J4,0)/28,LINETHICK3,COLORMAGENTA;
强势资金1:=攻击资金/REF(攻击资金,1)>4&&(C-REF(C,1))/REF(C,1)>0.098&&REF(攻击资金,1)/ REF(攻击资金,2)>10&&(C-REF(C,1))/REF(C,1)>0.098;
强势资金2:=BETWEEN(攻击资金/REF(攻击资金,1),3,3.99)&&(C-REF(C,1))/REF(C,1)>0.098&&REF(攻击资金,1)/ REF(攻击资金,2)>10&&(C-REF(C,1))/REF(C,1)>0.098;
强势:=LAST(多头线>快助长线,2,0)&&快助长线>慢助长线&&LAST(多头线>REF(多头线,1),2,0)&&空头线< 15;
强势牛股:=强势资金1&&强势;
疯牛出现:=REF(强势牛股,1)&&V>REF(V,1)&&(C-REF(C,1))/REF(C,1)>0.0985;
牛股:=强势资金2&&强势;
强势上涨:=(C-REF(C,3))/REF(C,3)>0.2;
严重超跌:REF(C,20)/C>1.5,COLORGREEN;
大牛雏形:=LAST(多头线>空头线,30,0);
量比:VOL/REF(MA(VOL,5),1),NODRAW;
过利:=FILTER(强势牛股,5);
牛初:IF(REF(攻击资金/REF(攻击资金,1)>4.5&&(C-REF(C,1))/REF(C,1)>0.098,1)&&攻击资金/REF( 攻击资金,1)>3&&(C-REF(C,1))/REF(C,1)>0.098,2.5,0);
过利牛初:=FILTER(牛初,5);
STICKLINE(牛股,1.85,0,4,0),COLORWHITE;
STICKLINE(强势牛股,1.65,0,4,0),COLORRED;
STICKLINE(疯牛出现,2.8,0,4,0),COLORRED;
STICKLINE(疯牛出现,1.25,0,4,0),COLORYELLOW;
STICKLINE(牛初,1,0,4,0),COLORYELLOW;
DRAWTEXT(过利,1,'强势牛股'),,COLORMAGENTA ;
STICKLINE(严重超跌,1,0,6,0),COLORGREEN;
DRAWTEXT(过利,1,'明天量要大过今天'),COLORYELLOW ;
DRAWTEXT(疯牛出现,2.5,'疯牛出现'),COLORYELLOW ;
DRAWTEXT(牛股,1.35,'必须要底部清晰'),COLORRED ;
DRAWTEXT(过利牛初,0.8,'牛初'),,COLORMAGENTA ;
上涨气势:=LAST(多头线>空头线&&快助长线>空头线&&慢助长线>空头线,10,0)&&慢助长线>58;
涨势回落:=C< MA(C,5)&&REF(C< MA(C,5),1);
阶段顶:IF(上涨气势&&涨势回落,1.5,2.0),COLORGREEN ;