HZ:HHV((H+L)/2,120);
AA:=(2*C+H+L)/4;
//Var1:=IF(DATE=10301201,0,1);
Var2:=EMA(SLOPE(CLOSE,21)*20+CLOSE,55);
Var3:=EMA(CLOSE,3);
Var4:=(2*CLOSE+LOW+HIGH)/4;
Var5:=Var2-Var3;
VAR6:=CLOSE*VOL;
VAR7:=EMA((EMA(VAR6,3)/EMA(VOL,3)+EMA(VAR6,6)/EMA(VOL,6)+EMA(VAR6,12)/EMA(VOL,12)+EMA(VAR6,24)/EMA(VOL,24))/4,13);
VAR8:=EMA(CLOSE,9);
VAR9:=(CLOSE+OPEN)/2;
VAR11:=MA(CLOSE,3);
VAR12:=MA(CLOSE,2*3);
VAR13:=MA(CLOSE,3*3);
VAR14:=MA(CLOSE,4*3);
VAR15:=MA((VAR11+VAR12+VAR13+VAR14)/4,5);
上轨1:EMA(VAR8*1.14,5),colorgreen,LINETHICK1;
上轨2:=VAR15*1.08,colorwhite,LINETHICK1;
操作线:MA(AA,5),colormagenta,LINETHICK2;
风险线:=MA(CLOSE,13);
黄线:(EMA(VAR9,3)+EMA(VAR9,6)+EMA(VAR9,12)+EMA(VAR9,24))/4,coloryellow,linethick3;
精品1:=EMA(EMA(EMA(CLOSE,2),2),2);
精品2:(MA(精品1,13) * 0.999),colorwhite,linethick2;
道2:=6*HHV(精品2,3)-5*精品2;
PARTLINE(精品2,精品2=道2,colorred,精品2<道2,colorwhite),LINETHICK3;
青线:EMA(Var4,45)*1.15,colorcyan,linethick2;
绿线:EMA(Var4,55),colorgreen,linethick3;
牛股:=CROSS((100-100*(HHV(HIGH,5*8)-CLOSE)/(HHV(HIGH,5*8)-LLV(LOW,5*8))),99);
攻:=REF(C,REF(HHVBARS(V,21),0));
进攻:=MA(CLOSE,1);
指挥:=V>1*REF(V,1) AND (C/REF(C,1)-1)*100>9.5 AND 进攻>=攻;
DK:=EMA((CLOSE-MA((2*CLOSE+HIGH+LOW)/4,30))/MA((2*CLOSE+HIGH+LOW)/4,30)*100,3),colorwhite;
组合1:=牛股 AND 指挥 AND (CROSS(DK,5) OR CROSS(DK,10));
基础0:=DK>REF(DK,1) AND REF(DK,1)>REF(DK,2) AND REF(DK,2)>REF(DK,3);
基础1:=绿线>REF(绿线,1) AND REF(绿线,1)>REF(绿线,2) AND REF(绿线,2)>REF(绿线,3);
基础2:=精品2>REF(精品2,1) AND REF(精品2,1)>REF(精品2,2) AND REF(精品2,2)>REF(精品2,3);
基础3:=黄线>REF(黄线,1) AND REF(黄线,1)>REF(黄线,2) AND REF(黄线,2)>REF(黄线,3);
基础4:=操作线>REF(操作线,1) AND REF(操作线,1)>REF(操作线,2) AND REF(操作线,2)>REF(操作线,3);
三角1:=基础0 AND CROSS(DK,0);
三角2:=基础0 AND CROSS(DK,5);
三角3:=基础0 AND CROSS(DK,10);
买1:=基础1 AND 基础2 AND 基础3 AND 基础4 AND CROSS(黄线,绿线);
买2:=基础1 AND 基础2 AND 基础3 AND 基础4 AND CROSS(精品2,绿线);
买3:=基础1 AND 基础2 AND 基础3 AND 基础4 AND CROSS(C,青线);
买4:=基础1 AND 基础2 AND 基础3 AND 基础4 AND CROSS(黄线,青线);
DRAWICON(组合1,L*0.99,1),ALIGN1;
DRAWTEXT(三角1,L*0.96,'▲'),ALIGN0,PXDN20,colorwhite;
DRAWTEXT(三角2,L*0.96,'▲'),ALIGN0,PXDN20,colormagenta;
DRAWTEXT(三角3,L*0.96,'▲'),ALIGN0,PXDN20,coloryellow;
DRAWTEXT(买1 OR 买2 OR 买3 OR 买4,H*1.07,'买'),ALIGN0,PXDN20,coloryellow;
DRAWTEXT(买1,H*1.04,'1'),ALIGN0,PXDN20,coloryellow;
DRAWTEXT(买2,H*1.04,'2'),ALIGN0,PXDN20,coloryellow;
DRAWTEXT(买3,H*1.04,'3'),ALIGN0,PXDN20,coloryellow;
DRAWTEXT(买4,H*1.04,'4'),ALIGN0,PXDN20,coloryellow;