以下是通达信多周期同显副图指标公式源码和截图
通达信kdj多周期同显副图指标公式源码:
日K:="KDJ.K#DAY"(9,3,3);
日J:="KDJ.J#DAY"(9,3,3);
STICKLINE(日J =REF(日J,1),1.6,1.5,2,0),COLORRED;
STICKLINE(日J REF(日K,1),1.6,1.5,2,0),COLORGRAY;
STICKLINE(CROSS(日J 日K,0.5),1.6,1.5,2,0),COLORCC77CC;
STICKLINE(CROSS(日K 日J,0.5),1.6,1.5,2,0),COLOR00FF00;
DRAWICON(CROSS(日J 日K,0.5),1.6,1);
DRAWICON(CROSS(日K 日J,0.5),1.6,2);
DRAWTEXT(ISLASTBAR=1,1.6,'日J'),COLORFFFFFF;
周K:="KDJ.K#WEEK"(9,3,3);
周J:="KDJ.J#WEEK"(9,3,3);
STICKLINE(周J =REF(周J,1),1.3,1.2,2,0),COLORRED;
STICKLINE(周J REF(周K,1),1.3,1.2,2,0),COLORGRAY;
STICKLINE(CROSS(周J 周K,0.5),1.3,1.2,2,0),COLORCC77CC;
RSV:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;K:SMA(RSV,3,1),COLORWHITE;{白色}D:SMA(K,3,1),COLORYELLOW;{黄色}J:3*K-2*D,COLORFF00FF;{粉红}JJ:J-K,COLORSTICK;{JJ要红色,J-K 0,红柱,J-K 0兰柱}
VAR6:=4*SMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5,1)-
3*SMA(SMA((CLOSE-LLV(LOW,25))/(HHV(HIGH,25)-LLV(LOW,25))*100,5,1),3,1);
VAR7:=8;
准备:IF(VAR6 =8,30,0),STICK,COLORWHITE,LINETHICK2;
买入:IF(CROSS(VAR6,VAR7),80,0),STICK,COLORGREEN,LINETHICK2;
RSV=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
a=SMA(RSV,M1,1);
b=SMA(a,M2,1);
IF(a 0)a=0;
IF(a 100)a=100;
IF(b 0)b=0;
IF(b 100)b=100;
K:a;
D:b;
DRAWTEXT(REF(a,1)-REF(b,1) 0AND(a-b 0),b,'买入'),colorred;
DRAWTEXT(REF(a,1)-REF(b,1) 0AND(a-b 0),b,'卖出'),colorgreen;
上:80;
中:20;
STICKLINE(CROSS(周K 周J,0.5),1.3,1.2,2,0),COLOR00FF00;
DRAWICON(CROSS(周J 周K,0.5),1.3,1);
DRAWICON(CROSS(周K 周J,0.5),1.3,2);
DRAWTEXT(ISLASTBAR=1,1.3,'周J'),COLORFFFFFF;
月K:="KDJ.K#MONTH"(9,3,3);
月J:="KDJ.J#MONTH"(9,3,3);
STICKLINE(月J =REF(月J,1),1,0.9,2,0),COLORRED;
STICKLINE(月J REF(月K,1),1,0.9,2,0),COLORGRAY;
STICKLINE(CROSS(月J 月K,0.5),1,0.9,2,0),COLORCC77CC;
STICKLINE(CROSS(月K 月J,0.5),1,0.9,2,0),COLOR00FF00;
DRAWICON(CROSS(月J 月K,0.5),1,1);
DRAWICON(CROSS(月J 月K,0.5),1,2);
DRAWTEXT(ISLASTBAR=1,1,'月J'),COLORFFFFFF;
通达信kdj多周期同显副图指标公式截图