您的位置:股票站 > 查股公式 > 通达信行业指数 特殊顶底分型信号提示副图指标公式源码[查股公式]
股票行情消息数据:

通达信行业指数 特殊顶底分型信号提示副图指标公式源码[查股公式]

2022/8/10 9:40:09

特殊顶 是 顶分型右包含关系;
特殊顶2 是 顶分型左包含关系;
特殊顶3 是 顶分型包含4根关系

特殊底 是 底分型包含关系;
底 是 底分型上破5日线;
底3 是 底分型上破3日线;
底5 是 底分型上破5日线;

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:=L1<REF(L1,1) AND REF(L1,1)>REF(L1,2) AND H1<REF(H1,1) AND REF(H1,1)>REF(H1,2) AND REF(H1,1)>H1 AND  C1<MA5 AND REF(C1>多引用,1) AND REF(HHV(H1,7),2)<REF(H1,1),NODRAW ;
顶3:=L1<REF(L1,1) AND REF(L1,1)>REF(L1,2) AND H1<REF(H1,1) AND REF(H1,1)>REF(H1,2) AND REF(H1,1)>H1 AND  C1<MA3 AND REF(C1>多引用,1) AND REF(HHV(H1,7),2)<REF(H1,1),NODRAW ;
顶:=L1<REF(L1,1) AND REF(L1,1)>REF(L1,2) AND  H1<=REF(H1,1) AND REF(H1,1)>REF(H1,2) AND REF(H1,1)>H1  AND REF(C1>多引用,1) AND REF(HHV(H1,7),2)<=REF(H1,1) ;

大顶:=IF(顶5=1 AND 顶3=1 AND 顶=1,顶5,DRAWNULL);
DRAWTEXT(大顶,H1*1.005,'大顶'), COLORGREEN;
次顶:=IF(顶5=0 AND 顶3=1 AND 顶=1,顶3,DRAWNULL);
DRAWTEXT(次顶,H1*1.005,'顶3'), COLORGREEN;
小顶:=IF(顶5=0 AND 顶3=0 AND 顶=1,顶,DRAWNULL);
DRAWTEXT(小顶,H1*1.005,'顶'), COLORGREEN;


特殊顶:=L1<REF(L1,1) AND REF(L1,1)>REF(L1,2) AND REF(L1,2)>REF(L1,3) AND H1<REF(H1,2) AND REF(H1,1)<REF(H1,2) AND  REF(HHV(H1,7),3)<REF(H1,2);
DRAWTEXT(特殊顶,H1*1.005,'特殊顶'),COLORCYAN; {顶分型右包含关系};

特殊顶2:=L1<REF(L1,2) AND REF(L1,2)>REF(L1,3) AND REF(L1,1)<REF(L1,2) AND REF(H1,1)>H1 AND REF(H1,1)>REF(H1,2) AND REF(H1,2)>REF(H1,3) AND REF(HHV(H1,7),2)<REF(H1,1);
DRAWTEXT(特殊顶2,H1*1.005,'特殊顶2'),COLORCYAN; {顶分型左包含关系};

特殊顶3:=L1<REF(L1,1) AND REF(L1,1)>REF(L1,2) AND REF(L1,2)>REF(L1,3) AND REF(L1,3)>REF(L1,4) AND H1<REF(H1,3) AND REF(H1,1)<REF(H1,3) AND REF(H1,2)<REF(H1,3) AND REF(H1,3)>REF(H1,4) AND REF(HHV(H1,7),4)<REF(H1,3);
DRAWTEXT(特殊顶3,H1*1.005,'特殊顶3'),COLORCYAN; {顶分型包含4根关系};


底5:=L1>REF(L1,1) AND REF(L1,1)<REF(L1,2) AND H1>REF(H1,1) AND REF(H1,1)<REF(H1,2) AND REF(H1,1)<H1 AND  C1>MA5 AND REF(C1<空引用,1) AND REF(LLV(L1,7),2)>REF(L1,1) AND C1>REF(C1,1) AND C1>REF(O1,1);
DRAWTEXT(底5,L1*0.992,'底5'),COLORRED; {底分型上破5日线}

底3:=L1>REF(L1,1) AND REF(L1,1)<REF(L1,2) AND H1>REF(H1,1) AND REF(H1,1)<REF(H1,2) AND REF(H1,1)<H1 AND  C1>MA3 AND REF(C1<空引用,1) AND REF(LLV(L1,7),2)>REF(L1,1) AND C1>REF(C1,1) AND C1>REF(O1,1);
DRAWTEXT(底3,L1*0.992,'底3'),COLORRED; {底分型上破3日线}

底:=L1>REF(L1,1) AND REF(L1,1)<REF(L1,2) AND H1>REF(H1,1) AND REF(H1,1)<REF(H1,2) AND REF(H1,1)<H1  AND REF(C1<空引用,1) AND REF(LLV(L1,7),2)>REF(L1,1) AND C1>REF(C1,1) AND C1>REF(O1,1);
DRAWTEXT(底,L1*0.992,'底'),COLORRED; {底分型上破5日线}

特殊底:=L1>REF(L1,1) AND REF(L1,1)>REF(L1,2) AND REF(L1,2)<REF(L1,3) AND H1>REF(H1,1) AND REF(H1,1)<REF(H1,2) AND  REF(LLV(L1,7),3)>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;{介于3 5画线};
走弱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) AND REF(C1<O1,1) AND V1>REF(V1,1);
阳胜:=C1>REF(C1,1) AND REF(C1<O1,1) AND C1>REF(O1,1) AND V1<REF(V1,1);
量胜:=C1>REF(C1,1) AND REF(C1<O1,1) AND V1>REF(V1,1) AND REF(O1,1)>C1;
单阳胜:=IF(阳胜 OR 量胜,1,0);

STICKLINE((双阳胜) AND BETWEEN(C,0,4000),O1,O1+(C1-O1)/10,3,0),COLORMAGENTA;
STICKLINE((单阳胜) AND BETWEEN(C,0,4000),O1+(C1-O1)/3,O1+(C1-O1)/3,3,0),COLORMAGENTA;


双阴胜:=C1<REF(O1,1) AND REF(C1>O1,1) AND V1>REF(V1,1);
价阴胜:=REF(C1>O1,1) AND C1<REF(O1,1) AND V1<REF(V1,1);
量阴胜:=REF(C1>O1,1) AND C1>REF(O1,1) AND V1>REF(V1,1) AND C1<O1 AND C1<REF(C1,1);
单阴胜:=IF(价阴胜 OR 量阴胜,1,0);

STICKLINE((双阴胜) AND BETWEEN(C1,0,4000),O1,O1+(C1-O1)/10,3,0),COLORBLUE;
STICKLINE((单阴胜) AND BETWEEN(C1,0,4000),O1+(C1-O1)/2,O1+(C1-O1)/2,3,0),COLORBLUE;

相关文章列表
天天查股公式列表

股票公式分类

天天查股:股票行情消息 实时DDX在线 资金流向 千股千评 业绩报告 十大股东 最新消息 超赢数据 大小非解禁 停牌复牌 股票分红数据 股票评级报告
广告客服:315126368   843010021
股票站免费查股,本站内容与数据仅供参考,不构成投资建议,据此操作,风险自担,股市有风险,投资需谨慎。 沪ICP备15043930号-29