A:=REF(HY_INDEXC,1);
涨幅:IF(A 0,(HY_INDEXC-A)*100/A,0),NODRAW;
HYDB:DRAWKLINE(HY_INDEXH,HY_INDEXO,HY_INDEXL,HY_INDEXC);
MA3:=MA(HY_INDEXC,3);
MA5:=MA(HY_INDEXC,5);
H1:=HY_INDEXH;
L1:=HY_INDEXL;
C1:=HY_INDEXC;
O1:=HY_INDEXO;
V1:=HY_INDEXV;
多引用:=CALCSTOCKINDEX(HYZSCODE, 多空引用 ,1),NODRAW;{多引用}
空引用:=CALCSTOCKINDEX(HYZSCODE, 多空引用 ,2),NODRAW;{空引用}
指数低点:=EMA(EMA((H1+L1+O1+C1)/4,5),5)*0.965,DOTLINE,COLORLIMAGENTA;
指数顶点:=EMA(EMA((H1+L1+O1+C1)/4,5),5)*1.035,DOTLINE,COLORLIGREEN;
顶5:=L1REF(L1,2)ANDH1REF(H1,2)ANDREF(H1,1) H1ANDC1多引用,1)ANDREF(HHV(H1,7),2) REF(H1,1),NODRAW;
顶3:=L1REF(L1,2)ANDH1REF(H1,2)ANDREF(H1,1) H1ANDC1多引用,1)ANDREF(HHV(H1,7),2) REF(H1,1),NODRAW;
顶:=L1REF(L1,2)ANDH1REF(H1,2)ANDREF(H1,1) H1ANDREF(C1 多引用,1)ANDREF(HHV(H1,7),2) =REF(H1,1);
大顶:=IF(顶5=1AND顶3=1AND顶=1,顶5,DRAWNULL);
DRAWTEXT(大顶,H1*1.005, 大顶 ),COLORGREEN;
次顶:=IF(顶5=0AND顶3=1AND顶=1,顶3,DRAWNULL);
DRAWTEXT(次顶,H1*1.005, 顶3 ),COLORGREEN;
小顶:=IF(顶5=0AND顶3=0AND顶=1,顶,DRAWNULL);
DRAWTEXT(小顶,H1*1.005, 顶 ),COLORGREEN;
特殊顶:=L1REF(L1,2)ANDREF(L1,2) REF(L1,3)ANDH1 REF(H1,2)ANDREF(H1,1) REF(H1,2)ANDREF(HHV(H1,7),3) REF(H1,2);
DRAWTEXT(特殊顶,H1*1.005, 特殊顶 ),COLORCYAN;{顶分型右包含关系};
特殊顶2:=L1REF(L1,3)ANDREF(L1,1)H1ANDREF(H1,1) REF(H1,2)ANDREF(H1,2) REF(H1,3)ANDREF(HHV(H1,7),2) REF(H1,1);
DRAWTEXT(特殊顶2,H1*1.005, 特殊顶2 ),COLORCYAN;{顶分型左包含关系};
特殊顶3:=L1REF(L1,2)ANDREF(L1,2) REF(L1,3)ANDREF(L1,3) REF(L1,4)ANDH1REF(H1,4)ANDREF(HHV(H1,7),4) REF(H1,3);
DRAWTEXT(特殊顶3,H1*1.005, 特殊顶3 ),COLORCYAN;{顶分型包含4根关系};
5:=L1 REF(L1,1)ANDREF(L1,1)REF(H1,1)ANDREF(H1,1)MA5ANDREF(C1REF(L1,1)ANDC1 REF(C1,1)ANDC1 REF(O1,1);
DRAWTEXT(底5,L1*0.992, 底5 ),COLORRED;{底分型上破5日线}
顶底3:=L1 REF(L1,1)ANDREF(L1,1)REF(H1,1)ANDREF(H1,1)MA3ANDREF(C1REF(L1,1)ANDC1 REF(C1,1)ANDC1 REF(O1,1);
DRAWTEXT(底3,L1*0.992, 底3 ),COLORRED;{底分型上破3日线}
顶底:=L1 REF(L1,1)ANDREF(L1,1)REF(H1,1)ANDREF(H1,1)REF(L1,1)ANDC1 REF(C1,1)ANDC1 REF(O1,1);
DRAWTEXT(底,L1*0.992, 底 ),COLORRED;{底分型上破5日线}
特殊底:=L1 REF(L1,1)ANDREF(L1,1) REF(L1,2)ANDREF(L1,2)REF(H1,1)ANDREF(H1,1)REF(L1,2);
DRAWTEXT(特殊底,L1*0.992, 特殊底 ),COLORYELLOW;{底分型包含关系};
{抛物线}
抛物线:=CALCSTOCKINDEX(HYZSCODE, 抛物线值引用 ,1),NODRAW;
空:IF(抛物线 =H1,抛物线,DRAWNULL),COLORWHITE,DOTLINE;
多:IF(抛物线 =L1,抛物线,DRAWNULL),COLORMAGENTA,DOTLINE;
抛物线2:=CALCSTOCKINDEX(HYZSCODE, 抛物线值引用 ,2),NODRAW;
空2:=IF(抛物线2 =H1,抛物线2,DRAWNULL),COLORWHITE;
多2:=IF(抛物线2 =L1,抛物线2,DRAWNULL),COLORMAGENTA;
行业转多天数:=CALCSTOCKINDEX(HYZSCODE, 多空天数引用 ,1),NODRAW;
行业转空天数:=CALCSTOCKINDEX(HYZSCODE, 多空天数引用 ,2),NODRAW;
DRAWTEXT_FIX(1,0.915,0.9,0, 注:行业指数展示 ),COLORYELLOW;
行业破3:=CALCSTOCKINDEX(HYZSCODE, 跌破引用 ,1),NODRAW;
行业破5:=CALCSTOCKINDEX(HYZSCODE, 跌破引用 ,2),NODRAW;
走弱3:IF(行业破3=3,H1*1.02,DRAWNULL),CIRCLEDOT,COLORGREEN;{介于35画线};
走弱5:IF(行业破5=5,H1*1.02,DRAWNULL),CIRCLEDOT,COLORBLUE;
行业上3:=CALCSTOCKINDEX(HYZSCODE, 跌破引用 ,5),NODRAW;
走强3:IF(行业上3=3,L1*0.98,DRAWNULL),CIRCLEDOT,COLORLIRED;
{行业模型信号引用}
行业多引用:=CALCSTOCKINDEX(HYZSCODE, 多引用5 ,3),NODRAW;{行业首次转多}
STICKLINE(行业多引用,C1,O1,0.8,0),COLORYELLOW;
行业空引用:=CALCSTOCKINDEX(HYZSCODE, 波段空引用5 ,3),NODRAW;{行业首次转空}
STICKLINE(行业空引用,C1,O1,0.8,0),COLORGREEN;
{阳胜,阴胜}
双阳胜:=C1 REF(O1,1)ANDREF(C1REF(V1,1);
阳胜:=C1 REF(C1,1)ANDREF(C1REF(O1,1)ANDV1 REF(V1,1);
量胜:=C1 REF(C1,1)ANDREF(C1REF(V1,1)ANDREF(O1,1)
单阳胜:=IF(阳胜OR量胜,1,0);
STICKLINE((双阳胜)ANDBETWEEN(C,0,4000),O1,O1+(C1-O1)/10,3,0),COLORMAGENTA;
STICKLINE((单阳胜)ANDBETWEEN(C,0,4000),O1+(C1-O1)/3,O1+(C1-O1)/3,3,0),COLORMAGENTA;
双阴胜:=C1O1,1)ANDV1 REF(V1,1);
价阴胜:=REF(C1 O1,1)ANDC1 REF(O1,1)ANDV1 REF(V1,1);
量阴胜:=REF(C1 O1,1)ANDC1 REF(O1,1)ANDV1 REF(V1,1)ANDC1 O1ANDC1 REF(C1,1);
单阴胜:=IF(价阴胜OR量阴胜,1,0);
STICKLINE((双阴胜)ANDBETWEEN(C1,0,4000),O1,O1+(C1-O1)/10,3,0),COLORBLUE;
STICKLINE((单阴胜)ANDBETWEEN(C1,0,4000),O1+(C1-O1)/2,O1+(C1-O1)/2,3,0),COLORBLUE;
引用: