通达信寻龙共振副图指标 源码分享 附图
X_1:=EMA(CLOSE,12*4*4)-EMA(CLOSE,26*4*4);
X_2:=EMA(X_1,9*4*4);
X_3:=2*(X_1-X_2);
X_4:=EMA(CLOSE,12*4)-EMA(CLOSE,26*4);
X_5:=EMA(X_4,9*4);
X_6:=2*(X_4-X_5);
X_7:=EMA(CLOSE,12)-EMA(CLOSE,26);
X_8:=EMA(X_7,9);
X_9:=2*(X_7-X_8);
X_10:=EMA(CLOSE,12)-EMA(CLOSE,26);
X_11:=EMA(X_10,9);
X_12:=2*(X_10-X_11);
X_13:=HHVBARS(X_12,BARSLAST(X_12<0)+1);
X_14:=CROSS(BACKSET(CROSS(0,X_12),REF(X_13,1)+2),0.5);
X_15:=CROSS(BACKSET(CROSS(0,X_12) OR (ISLASTBAR AND X_12>0),REF(X_13,1)+2),0.5);
前高线:DRAWLINE(X_14,X_12,REF(X_14,1),REF(X_12,1),1),COLORMAGENTA;
X_16:=REF(X_12/2,BARSLAST(X_12=HHV(X_12,120)));
MACD250:REF(X_12/2,BARSLAST(X_12=HHV(X_12,250))),COLORYELLOW,LINETHICK2;
X_17:=NOT(REF(X_16,1)=X_16);
STICKLINE(X_12>=MACD250,MACD250,X_12,2,0),COLORMAGENTA;
STICKLINE(X_12>=MACD250 AND X_12>REF(X_12,1),X_12,0,1,0),COLORYELLOW;
X_18:=NOT(REF(X_16,1)=REF(MACD250,1)) AND X_16=MACD250;
X_19:=EMA(CLOSE,12)-EMA(CLOSE,26);
X_20:=EMA(X_19,9);
X_21:=CLOSE>INTPART(REF(CLOSE,1)*(1+10/100)/0.01+0.5)*0.01-0.006 AND CLOSE=HIGH;
X_22:=X_19>(-0.2) AND X_19<0.35 AND X_21 AND REF(X_21,1)<1 AND COUNT(X_10>=(-0.01),5)=5;
DRAWTEXT(X_22,MACD250*1.3,4),COLORRED;
STICKLINE(X_3>REF(X_3,1),MACD250,0,5,0),COLORLIMAGENTA;
STICKLINE(X_3<REF(X_3,1),MACD250,0,5,0),COLORLIGREEN;
DRAWBAND(EMA(X_6,10),RGB(0,0,180),X_6,RGB(255,255,0));
STICKLINE(X_12>0 AND X_12>REF(X_12,1),0,X_12,1,0),COLORYELLOW;
STICKLINE(X_12>0 AND X_12<REF(X_12,1),0,X_12,1,0),COLORLIBLUE;
STICKLINE(X_12<0,0,X_12,1,0),COLORGREEN;
STICKLINE(X_12>=MACD250,MACD250,X_12,2,0),COLORMAGENTA;
日MACD1:X_12,COLORYELLOW,LINETHICK4;
MACD2501:REF(X_12/2,BARSLAST(X_12=HHV(X_12,250))),NODRAW,COLORYELLOW,LINETHICK3;
未来函数检测结果如下:
该公式包含未来函数:BACKSET
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
X_1赋值:收盘价的12*4*4日指数移动平均-收盘价的26*4*4日指数移动平均
X_2赋值:X_1的9*4*4日指数移动平均
X_3赋值:2*(X_1-X_2)
X_4赋值:收盘价的12*4日指数移动平均-收盘价的26*4日指数移动平均
X_5赋值:X_4的9*4日指数移动平均
X_6赋值:2*(X_4-X_5)
X_7赋值:收盘价的12日指数移动平均-收盘价的26日指数移动平均
X_8赋值:X_7的9日指数移动平均
X_9赋值:2*(X_7-X_8)
X_10:=收盘价的12日指数移动平均-收盘价的26日指数移动平均
X_11:=X_10的9日指数移动平均
X_12:=2*(X_10-X_11)
X_13:=HHVBARS(X_12,上次X_12<0距今天数+1)
X_14:=CROSS(BACKSET(CROSS(0,X_12),1日前的X_13+2),0.5)
X_15:=CROSS(BACKSET(CROSS(0,X_12) OR (ISLASTBAR AND X_12>0),1日前的X_13+2),0.5)
输出前高线:DRAWLINE(X_14,X_12,1日前的X_14,1日前的X_12,1),画洋红色
X_16:=REF(X_12/2,上次X_12=120日内X_12最高值距今天数)
输出MACD250:REF(X_12/2,上次X_12=250日内X_12最高值距今天数),画黄色, 线宽为2
X_17:=NOT(1日前的X_16=X_16)
当满足条件X_12>=MACD250时,在MACD250和X_12之间画柱状线
STICKLINE(X_12>=MACD250 AND X_12>1日前的X_12,X_12,0,1,0),画黄色
X_18:=NOT(1日前的X_16=1日前的MACD250) AND X_16=MACD250
X_19:=收盘价的12日指数移动平均-收盘价的26日指数移动平均
X_20:=X_19的9日指数移动平均
X_21:=收盘价>INTPART(1日前的收盘价*(1+10/100)/0.01+0.5)*0.01-0.006 AND 收盘价=最高价
X_22:=X_19>(-0.2) AND X_19<0.35 AND X_21 AND 1日前的X_21<1 AND COUNT(X_10>=(-0.01),5)=5
当满足条件X_22时,在MACD250*1.3和4位置书写文字
STICKLINE(X_3>1日前的X_3,MACD250,0,5,0),COLORLIMAGENTA
STICKLINE(X_3<1日前的X_3,MACD250,0,5,0),COLORLIGREEN
DRAWBAND(X_6的10日指数移动平均,RGB(0,0,180),X_6,RGB(255,255,0))
STICKLINE(X_12>0 AND X_12>1日前的X_12,0,X_12,1,0),画黄色
STICKLINE(X_12>0 AND X_12<1日前的X_12,0,X_12,1,0), 画淡蓝色
当满足条件X_12<0时,在0和X_12之间画柱状线
当满足条件X_12>=MACD250时,在MACD250和X_12之间画柱状线
输出日MACD1:X_12,画黄色, 线宽为4
MACD2501:REF(X_12/2,上次X_12=250日内X_12最高值距今天数),NODRAW,画黄色, 线宽为3