KD周期共振密码 简单直观 大智慧通达信通用
源码
N:9;
M1:=3;
M2:=3;
月K:="KDJ.K#MONTH";
月D:="KDJ.D#MONTH";
周K:="KDJ.K#WEEK";
周D:="KDJ.D#WEEK";
日K:="KD.K";
日D:="KD.D";
日金叉:IF(CROSS(日K,日D),20,0),COLORWHITE;
周金叉:IF(CROSS(周K,周D),40,0),COLORRED;
月金叉:IF(CROSS(月K,月D),60,0),COLOR0080FF;
REFLINE: 0, 20, 50, 80, 100;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1);
D:SMA(K,M2,1);
涨幅:=C/REF(C,1)<1.07;
XG1:=CROSS(月K,月D) AND CROSS(周K,周D) AND 涨幅;
GZ1:=XG1;
DRAWTEXT(GZ1,K,'共振1号'),COLORWHITE;
XG2:=CROSS(月K,月D) AND CROSS(日K,日D) AND 涨幅;
GZ2:=XG2;
DRAWTEXT(GZ2,K,'共振2号'),COLOR0080FF;
XG3:=CROSS(日K,日D) AND CROSS(周K,周D) AND 涨幅;
GZ3:=XG3;
DRAWTEXT(GZ3,K,'共振3号'),COLORRED;