通达信周日KDJ金叉
DDATE:=DATE,NODRAW,COLOR0000FF;
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:SMA(RSV,3,1),COLORFFFFFF;
D:SMA(K,3,1),COLOR00FFFF;
J:3*K-2*D,COLORFF00FF;
D1:=DATE;
K01:=KDJ.K#WEEK;
D01:=KDJ.D#WEEK;
J01:=KDJ.J#WEEK;
WEK:=REFX(WEEKDAY<REF(WEEKDAY,1) OR DATETODAY(DATE)-DATETODAY(REF(DATE,1))>=7,1) OR ISLASTBAR;
D2:=IF(WEK,D1,DRAWNULL);
K02:=IF(WEK,K01,DRAWNULL);
D02:=IF(WEK,D01,DRAWNULL);
J02:=IF(WEK,J01,DRAWNULL);
WDATE:=ALIGNRIGHT(D2),NODRAW,COLOR00BB99;
周K:ALIGNRIGHT(K02),NODRAW,COLORFFFFFF;
周D:ALIGNRIGHT(D02),NODRAW,COLOR00FFFF;
周J:ALIGNRIGHT(J02),NODRAW,COLORFF00FF;
A1:=CONST(LLV(J,200))*5;
Q:=0.6;{股票指标网}
NOTEXT1:A1,COLOR336699,DOTLINE;
周K虚:周K*Q+A1,COLORFFFFFF,DOTLINE;
周D虚:周D*Q+A1,COLOR00FFFF,DOTLINE;
周J虚:周J*Q+A1,COLORFF00FF,DOTLINE;
日金叉:IF(CROSS(K,D),J,DRAWNULL),COLOR00FFFF,LINETHICK7,POINTDOT;
周金叉:IF(ISLASTBAR AND CROSS(周K,周D),周J虚,DRAWNULL),COLOR5555FF,LINETHICK7,POINTDOT;
0,COLOR00AA00;
未来函数检测结果如下:
该公式包含未来函数:#WEEK
该公式包含未来函数:REFX
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
DDATE赋值:DATE,NODRAW,COLOR0000FF
RSV赋值:(C-9日内L最低值)/(9日内H最高值-9日内L最低值)*100
RSV的3日[1日权重]移动平均
K的3日[1日权重]移动平均
输出
J:3*K-2*D,COLORFF00FF
D1:=DATE
K01:=KDJ.K#WEEK
D01:=KDJ.D#WEEK
J01:=KDJ.J#WEEK
WEK赋值:REFX(WEEKDAY<1日前的WEEKDAY OR DATETODAY(DATE)-DATETODAY(1日前的DATE)>=7,1) OR ISLASTBAR
如果WEK返回D1否则返回DRAWNULL
如果WEK返回K01否则返回DRAWNULL
如果WEK返回D01否则返回DRAWNULL
如果WEK返回J01否则返回DRAWNULL
WDATE赋值:ALIGNRIGHT(D2),NODRAW,COLOR00BB99
输出
周K:ALIGNRIGHT(K02),NODRAW,COLORFFFFFF
输出
周D:ALIGNRIGHT(D02),NODRAW,COLOR00FFFF
输出
周J:ALIGNRIGHT(J02),NODRAW,COLORFF00FF
A1赋值:CONST(200日内J最低值)*5
Q赋值:0.6
输出{股票指标网}
NOTEXT1:A1,COLOR336699,DOTLINE
周K虚:周K*Q+A1,COLORFFFFFF,DOTLINE
周D虚:周D*Q+A1,COLOR00FFFF,DOTLINE
周J虚:周J*Q+A1,COLORFF00FF,DOTLINE
输出
日金叉:IF(K上穿D,J,DRAWNULL),COLOR00FFFF,LINETHICK7,POINTDOT
输出
周金叉:IF(ISLASTBAR AND 周K上穿周D,周J虚,DRAWNULL),COLOR5555FF,LINETHICK7,POINTDOT
0,COLOR00AA00