通达信共振波段指标公式

 

DIFF:EMA(CLOSE,6)-EMA(CLOSE,13);
DEA:EMA(DIFF,5);
macd:(DIFF-DEA)*2,COLORSTICK;
HJ_4:=BArslAST(REF(crOSS(DEA,DIFF),1));
HJ_5:=REF(CLOSE,HJ_4+1)<CLOSE AND REF(DIFF,HJ_4+1)>DIFF;
HJ_6:=HJ_5 AND CROSS(DEA,DIFF) AND HJ_4>10 AND HJ_4<50;
HJ_7:=BARSLAST(REF(CROSS(DIFF,DEA),1));
HJ_8:=REF(CLOSE,HJ_7+1)>CLOSE AND REF(DIFF,HJ_7+1)<DIFF;
HJ_9:=HJ_8 AND CROSS(DIFF,DEA) AND HJ_7>10 AND HJ_7<50;
HJ_10:=CROSS(DIFF,DEA) AND DIFF<(-0.1);
HJ_11:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
HJ_12:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(HJ_11=2,21)=1;
HJ_13:=MA(CLOSE,60);
HJ_14:=HJ_13/15;
HJ_20:=CROSS(DEA,DIFF) AND DIFF>(0.1);
HJ_21:=COUNT(CROSS(DEA,DIFF),BARSLAST(DEA<=0));
HJ_22:=CROSS(DEA,DIFF) AND DEA>0 AND COUNT(HJ_21=2,21)=1;
底背离:HJ_9,NODRAW,COLORYELLOW,LINETHICK3;
低位金叉:HJ_10,NODRAW,COLORRED,LINETHICK3;
二次金叉:HJ_12,NODRAW,COLORMAGENTA,LINETHICK3;
顶背离:HJ_6,NODRAW,COLOR00F000,LINETHICK3;
高位死叉:HJ_20,NODRAW,COLORFF8000,LINETHICK3;
二次死叉:HJ_22,NODRAW,COLORFF0000,LINETHICK3;
HJ_15:=HJ_9 AND HJ_12 AND HJ_10;
前一最佳:BARSLAST(REF(HJ_15,1))+1,NODRAW,COLORWHITE;
DRAWICON(CROSS(DIFF,DEA),DIFF,1);
DRAWICON(CROSS(DEA,DIFF),DIFF,2);
STICKLINE(HJ_6,HJ_14*0.011,HJ_14*0.09,2,0),COLOR00F000;
STICKLINE(HJ_9,HJ_14*(-0.02),HJ_14*(-0.1),2,0),COLORYELLOW;
STICKLINE(HJ_10,HJ_14*0.011,HJ_14*0.09,2,0),COLORRED;
STICKLINE(HJ_12,HJ_14*0.125,HJ_14*0.2,2,0),COLORMAGENTA;
STICKLINE(HJ_20,HJ_14*0.011,HJ_14*0.09,2,0),COLORFFFF00;
STICKLINE(HJ_22,HJ_14*0.125,HJ_14*0.1,2,0),COLORFF0000;
IF ((DIFF>=REF(DIFF,1) AND DIFF>=0 ),DIFF,DRAWNULL),COLORRED LINETHICK2;
IF ((DIFF<=REF(DIFF,1) AND DIFF<=0 ),DIFF,DRAWNULL),COLORGREEN LINETHICK2;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
DRAWICON((CROSS(DIFF,DEA) AND CROSS(J,K)),DIFF,34);
DRAWICON((CROSS(DEA,DIFF) AND CROSS(K,J) AND DIFF>0),DIFF,35);




来函数检测结果如下
该公式没有未来函数


解密、定制、编写公式指标请联系QQ或微信同号:88652583
置顶指标

相关指标公式

输出DIFF:收盘价的6日指数移动平均-收盘价的13日指数移动平均
输出DEA:DIFF的5日指数移动平均
输出平滑异同平均线:(DIFF-DEA)*2,COLORSTICK
HJ_4赋值:上次1日前的DEA上穿DIFF距今天数
HJ_5赋值:HJ_4+1日前的收盘价<收盘价 AND HJ_4+1日前的DIFF>DIFF
HJ_6赋值:HJ_5 AND DEA上穿DIFF AND HJ_4>10 AND HJ_4<50
HJ_7赋值:上次1日前的DIFF上穿DEA距今天数
HJ_8赋值:HJ_7+1日前的收盘价>收盘价 AND HJ_7+1日前的DIFFHJ_9赋值:HJ_8 AND DIFF上穿DEA AND HJ_7>10 AND HJ_7<50
HJ_10赋值:DIFF上穿DEA AND DIFF<(-0.1)
HJ_11赋值:统计上次DEA>=0距今天数日中满足DIFF上穿DEA的天数
HJ_12赋值:DIFF上穿DEA AND DEA<0 AND 统计21日中满足HJ_11=2的天数=1
HJ_13赋值:收盘价的60日简单移动平均
HJ_14赋值:HJ_13/15
HJ_20赋值:DEA上穿DIFF AND DIFF>(0.1)
HJ_21赋值:统计上次DEA<=0距今天数日中满足DEA上穿DIFF的天数
HJ_22赋值:DEA上穿DIFF AND DEA>0 AND 统计21日中满足HJ_21=2的天数=1
输出底背离:HJ_9,NODRAW,画黄色,线宽为3
输出低位金叉:HJ_10,NODRAW,画红色,线宽为3
输出二次金叉:HJ_12,NODRAW,画洋红色,线宽为3
输出顶背离:HJ_6,NODRAW,COLOR00F000,线宽为3
输出高位死叉:HJ_20,NODRAW,COLORFF8000,线宽为3
输出二次死叉:HJ_22,NODRAW,COLORFF0000,线宽为3
HJ_15赋值:HJ_9 AND HJ_12 AND HJ_10
输出前一最佳:上次1日前的HJ_15距今天数+1,NODRAW,画白色
当满足条件DIFF上穿DEA时,在DIFF位置画1号图标
当满足条件DEA上穿DIFF时,在DIFF位置画2号图标
当满足条件HJ_6时,在HJ_14*0.011和HJ_14*0.09位置之间画柱状线,宽度为2,0不为0则画空心柱.,COLOR00F000
当满足条件HJ_9时,在HJ_14*(-0.02)和HJ_14*(-0.1)位置之间画柱状线,宽度为2,0不为0则画空心柱.,画黄色
当满足条件HJ_10时,在HJ_14*0.011和HJ_14*0.09位置之间画柱状线,宽度为2,0不为0则画空心柱.,画红色
当满足条件HJ_12时,在HJ_14*0.125和HJ_14*0.2位置之间画柱状线,宽度为2,0不为0则画空心柱.,画洋红色
当满足条件HJ_20时,在HJ_14*0.011和HJ_14*0.09位置之间画柱状线,宽度为2,0不为0则画空心柱.,COLORFFFF00
当满足条件HJ_22时,在HJ_14*0.125和HJ_14*0.1位置之间画柱状线,宽度为2,0不为0则画空心柱.,COLORFF0000
如果(DIFF>=1日前的DIFFANDDIFF>=0),返回DIFF,否则返回无效数,画红色 线宽为2
如果(DIFF<=1日前的DIFFANDDIFF<=0),返回DIFF,否则返回无效数,画绿色 线宽为2
RSV赋值:(收盘价-9日内最低价的最低值)/(9日内最高价的最高值-9日内最低价的最低值)*100
K赋值:RSV的3日[1日权重]移动平均
D赋值:K的3日[1日权重]移动平均
J赋值:3*K-2*D
当满足条件(DIFF上穿DEAANDCROSS(J,K))时,在DIFF位置画34号图标
当满足条件(DEA上穿DIFFANDCROSS(K,J)ANDDIFF>0)时,在DIFF位置画35号图标

指标安装下载帮助  |   联系我们  |  股朋指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股朋指标网别名指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
免责声明:股朋指标网所有指标公式及文章由网络收集,不保障实时性和真实性, 仅供学习研究并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。
QQ:88652583 微信 88652583
sitemap站点地图