KDJ全波段通达信指标 源码 贴图
ZJ1:=MA("KDJ.J#WEEK"(9,3,3) ,5);
STICKLINE(ZJ1>=0 AND ZJ1>=REF(ZJ1,1),0,100,4,0),COLORAA0077;
STICKLINE(ZJ1<0 ,0,50,4,0),COLOR060066;
STICKLINE(ZJ1<0 AND ZJ1>=REF(ZJ1,1),0,100,4,0),COLOR000088;
YK:=MA("KDJ.K#MONTH"(9,3,3),20);
YD:=MA("KDJ.D#MONTH"(9,3,3),20);
YJ:=MA("KDJ.J#MONTH"(9,3,3),20);
STICKLINE(YK>=YD,YK,YD,1,0),COLOR880088;
STICKLINE(YK<YD,YK,YD,1,1),COLORAAAAAA;
ZK:=MA("KDJ.K#WEEK"(9,3,3) ,5);
ZD:=MA("KDJ.D#WEEK"(9,3,3) ,5);
DRAWBAND(ZK,RGB(200,0,0),ZD,RGB(0,200,200));
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;
{股票指标网}
DRAWBAND(K,RGB(250,0,200),D,RGB(200,170,100));
日金叉:IF(CROSS(K,D),7,0),COLORMAGENTA,LINETHICK2;
DRAWBAND(日金叉,RGB(250,0,250),0,RGB(0,0,0));
日死叉: IF(CROSS(D,K),93,100), COLOR00FF00,LINETHICK2;
DRAWBAND(100,RGB(0,250,0),日死叉,RGB(0,0,0));
周金叉:IF(CROSS(ZK,ZD),12,0),COLORRED,LINETHICK2;
DRAWBAND(周金叉,RGB(250,0,0),0,RGB(0,0,0));
周死叉:IF(CROSS(ZD,ZK),87,100), COLORFFFF00,LINETHICK2;
DRAWBAND(100,RGB(0,250,250),周死叉,RGB(0,0,0));
月金叉:IF(CROSS(YK,YD),17,0),COLORYELLOW,LINETHICK2;
DRAWBAND(月金叉,RGB(250,250,0),0,RGB(0,0,0));
月死叉:IF(CROSS(YD,YK),82,100),COLORFF0000,LINETHICK2;
DRAWBAND(100,RGB(0,0,250),月死叉,RGB(0,0,0));
IF(ZJ1<=0,0,DRAWNULL),COLORRED,LINETHICK4;
IF(ZJ1>85,ZJ1,DRAWNULL),COLOR00FFFF,LINETHICK2;
IF(ZJ1>85,100,DRAWNULL),COLOR00FFFF,LINETHICK4;
AA:=IF(ZJ1<0 AND ZJ1<REF(ZJ1,1),-5,0),COLOR00FFFF;
BB:=IF(ZJ1<0 AND ZJ1>=REF(ZJ1,1),-8,0),COLOR000088;
DRAWBAND(0,RGB(150,200,0),AA,RGB(0,0,0));
DRAWBAND(0,RGB(200,50,150),BB,RGB(0,0,0));
ZJ:ZJ1,COLOR0000FF,LINETHICK2;
IF(ZJ<REF(ZJ,1),ZJ,DRAWNULL),COLORFFFF00,LINETHICK2;
IF(ZJ<0 AND ZJ<REF(ZJ,1),ZJ,DRAWNULL),COLORFF00FF,LINETHICK2;
IF(ZJ<0 AND ZJ=REF(ZJ,1),ZJ,DRAWNULL),COLOR0000FF,LINETHICK2;
STICKLINE(C>0,50,50,2,0),COLOR00FFFF;{股票指标网}
DRAWTEXT_FIX(1,0.4,0.1,0,'★★ 深红色--提示准备★★暗红色--买入区★★紫粉色--加仓区★★顶部黄s--带风险提示★★'),COLORFFFFFF;
未来函数检测结果如下:
该公式包含未来函数:#MONTH
该公式包含未来函数:#WEEK
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
ZJ1赋值:MA("KDJ.J#WEEK"(9,3,3) ,5)
STICKLINE(ZJ1>=0 AND ZJ1>=1日前的ZJ1,0,100,4,0),COLORAA0077
当满足条件ZJ1<0 时,在0和50之间画柱状线
STICKLINE(ZJ1<0 AND ZJ1>=1日前的ZJ1,0,100,4,0),COLOR000088
YK赋值:MA("KDJ.K#MONTH"(9,3,3),20)
YD赋值:MA("KDJ.D#MONTH"(9,3,3),20)
YJ赋值:MA("KDJ.J#MONTH"(9,3,3),20)
当满足条件YK>=YD时,在YK和YD之间画柱状线
当满足条件YK
ZK赋值:MA("KDJ.K#WEEK"(9,3,3) ,5)
ZD赋值:MA("KDJ.D#WEEK"(9,3,3) ,5)
DRAWBAND(ZK,RGB(200,0,0),ZD,RGB(0,200,200))
RSV赋值:(收盘价-9日内最低价最低值)/(9日内最高价最高值-9日内最低价最低值)*100
RSV的3日[1日权重]移动平均
K的3日[1日权重]移动平均
J赋值:3*K-2*D
{股票指标网}
DRAWBAND(K,RGB(250,0,200),D,RGB(200,170,100))
输出
日金叉:IF(K上穿D,7,0),画洋红色, 线宽为2
DRAWBAND(日金叉,RGB(250,0,250),0,RGB(0,0,0))
输出
日死叉: IF(D上穿K,93,100), COLOR00FF00, 线宽为2
DRAWBAND(100,RGB(0,250,0),日死叉,RGB(0,0,0))
输出
周金叉:IF(ZK上穿ZD,12,0),画红色, 线宽为2
DRAWBAND(周金叉,RGB(250,0,0),0,RGB(0,0,0))
输出
周死叉:IF(ZD上穿ZK,87,100), COLORFFFF00, 线宽为2
DRAWBAND(100,RGB(0,250,250),周死叉,RGB(0,0,0))
输出
月金叉:IF(YK上穿YD,17,0),画黄色, 线宽为2
DRAWBAND(月金叉,RGB(250,250,0),0,RGB(0,0,0))
输出
月死叉:IF(YD上穿YK,82,100),COLORFF0000, 线宽为2
DRAWBAND(100,RGB(0,0,250),月死叉,RGB(0,0,0))
如果ZJ1<=0返回0否则返回DRAWNULL
如果ZJ1>85返回ZJ1否则返回DRAWNULL
如果ZJ1>85返回100否则返回DRAWNULL
AA赋值:IF(ZJ1<0 AND ZJ1<1日前的ZJ1,-5,0),COLOR00FFFF
BB赋值:IF(ZJ1<0 AND ZJ1>=1日前的ZJ1,-8,0),COLOR000088
DRAWBAND(0,RGB(150,200,0),AA,RGB(0,0,0))
DRAWBAND(0,RGB(200,50,150),BB,RGB(0,0,0))
输出
ZJ:ZJ1,COLOR0000FF, 线宽为2
IF(ZJ<1日前的ZJ,ZJ,DRAWNULL),COLORFFFF00, 线宽为2
IF(ZJ<0 AND ZJ<1日前的ZJ,ZJ,DRAWNULL),COLORFF00FF, 线宽为2
IF(ZJ<0 AND ZJ=1日前的ZJ,ZJ,DRAWNULL),COLOR0000FF, 线宽为2
当满足条件C>0时,在50和50之间画柱状线
当满足条件1时,在横轴0.4纵轴0.1位置书写文字