周金月金源码 副图 通达信 贴图
DIFF:=(EMA(CLOSE,12) - EMA(CLOSE,26));
DEA:=EMA(DIFF,9),COLORFF00FF,LINETHICK2;
CD:=2*(DIFF-DEA),COLORSTICK,LINETHICK2;
STICKLINE(((CD<REF(CD,1)) AND (CD > 0)),0,20,2,0),LINETHICK2,COLOR00FF66;
STICKLINE(((CD>REF(CD,1)) AND (CD < 0)),0,20,2,0),LINETHICK2,COLORFF00FF;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,3,1),COLORWHITE;
D:SMA(K,3,1),COLORYELLOW;
J:3*K-2*D,COLORRED;
周K:=EMA("KDJ.K#WEEK"(9,3,3) ,5);
周D:=EMA("KDJ.D#WEEK"(9,3,3) ,5);
周J:=EMA("KDJ.J#WEEK"(9,3,3) ,5);
DRAWICON(K<20 AND CROSS(K,D),D,1);
周金:DRAWTEXT(CROSS("KDJ.K#WEEK"(9,3,3),"KDJ.D#WEEK"(9,3,3)) ,D,'▲'),COLORRED;
周叉:DRAWTEXT(CROSS("KDJ.D#WEEK"(9,3,3),"KDJ.K#WEEK"(9,3,3)) ,D*1.5,'▼'),COLORGREEN;
月金:DRAWTEXT(CROSS("KDJ.K#MONTH"(9,3,3),"KDJ.D#MONTH"(9,3,3)) ,D,'▲'),COLORWHITE;
月叉:DRAWTEXT(CROSS("KDJ.D#MONTH"(9,3,3),"KDJ.K#MONTH"(9,3,3)) ,D*1.5,'▼'),COLORYELLOW;
起涨:IF(DIFF<0,30,0),COLORYELLOW,LINETHICK2;
大涨:IF(DIFF<0,0,DIFF),COLORWHITE,LINETHICK2;
下跌:IF(DIFF<DEA,DIFF,DEA),COLOR00FF00,LINETHICK2;
总趋:IF(DIFF>DEA,DEA,DEA)*60,COLORFF00FF,LINETHICK2;
AA:=CROSS(DIFF,DEA);
DRAWICON(AA,-0.02,5);
未来函数检测结果如下:
该公式包含未来函数:#MONTH
该公式包含未来函数:#WEEK
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
DIFF赋值:(收盘价的12日指数移动平均 - 收盘价的26日指数移动平均)
DEA赋值:DIFF的9日指数移动平均,COLORFF00FF,LINETHICK2
CD赋值:2*(DIFF-DEA),COLORSTICK,LINETHICK2
STICKLINE(((CD<1日前的CD) AND (CD > 0)),0,20,2,0),LINETHICK2,COLOR00FF66
STICKLINE(((CD>1日前的CD) AND (CD < 0)),0,20,2,0),LINETHICK2,COLORFF00FF
RSV赋值:(收盘价-9日内最低价最低值)/(9日内最高价最高值-9日内最低价最低值)*100
RSV的3日[1日权重]移动平均
K的3日[1日权重]移动平均
输出J:3*K-2*D,COLORRED
周K赋值:EMA("KDJ.K#WEEK"(9,3,3) ,5)
周D赋值:EMA("KDJ.D#WEEK"(9,3,3) ,5)
周J赋值:EMA("KDJ.J#WEEK"(9,3,3) ,5)
DRAWICON(K<20 AND K上穿D,D,1)
输出周金:DRAWTEXT(CROSS("KDJ.K#WEEK"(9,3,3),"KDJ.D#WEEK"(9,3,3)) ,D,'▲'),COLORRED
输出周叉:DRAWTEXT(CROSS("KDJ.D#WEEK"(9,3,3),"KDJ.K#WEEK"(9,3,3)) ,D*1.5,'▼'),画绿色
输出月金:DRAWTEXT(CROSS("KDJ.K#MONTH"(9,3,3),"KDJ.D#MONTH"(9,3,3)) ,D,'▲'),画白色
输出月叉:DRAWTEXT(CROSS("KDJ.D#MONTH"(9,3,3),"KDJ.K#MONTH"(9,3,3)) ,D*1.5,'▼'),画黄色
如果DF<0返回30否则返回0
如果DF<0返回0否则返回DIFF
如果DF如果DF>DEA返回DEA否则返回DEA
AA赋值:DIFF上穿DEA
当满足条件AA时,在-0.02和5之间画图标