看了论坛里的各个版本多周期KDJ,多少与系统自带KDJ存在差异,不能把周线级别的KDJ丝毫不差的在日线幅图中同步显示,在论坛老师们各版本KDJ源码启发下,成功的把周线级别KDJ在日线上完美显示。在日线显示周线KDJ,同时切换到周线图和系统自带的KDJ是一样的,只不过加了条100数值的风险线,不喜欢的自己可以删除。 摆荡类的指标在大周期里的成功率和安全性还是比较高的。
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;
周KK:=ALIGNRIGHT(K02),NODRAW,COLORFFFFFF;
周DD:=ALIGNRIGHT(D02),NODRAW,COLOR00FFFF;
周JJ:=ALIGNRIGHT(J02),NODRAW,COLORFF00FF;
WWWgoodgupiao.comCOM:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
A1:=CONST(LLV(J,200))*5;
Q:=0.6;
NOTEXT1:=A1,COLOR336699,;
周K:周KK,COLORFFFFFF,;
周D:周DD,COLOR00FFFF,;
周J:周JJ,COLORFF00FF,;
100,COLOR00AA00,DOTLINE;
{50,COLORLIGRAY,DOTLINE;};
20209288492177079.png
|