通达信多周期共振副图源码
{KD多周期共振}
RSV:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
K:=SMA(RSV,9,1);
D:=SMA(K,9,1);
J:3*K-2*D,COLORRED,LINETHICK2;
STICKLINE(J 0,J,0,0.1,0),COLORLIRED;
STICKLINE(J 100,J,100,0.1,0),COLORBLUE;
STICKLINE(J 0 AND J =REF(J,1),0,J-2,2,0),COLOR668800;
VAR21:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
K2:SMA(VAR21,3,1),COLOR0000FF;
D2:SMA(K2,3,1),COLOR0000FF,LINETHICK2;
DRAWBAND(K2,RGB(155,50,50),D2,RGB(0,100,50));
VAR34:=(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100;
K3:SMA(VAR34,3,1)DOTLINE,COLORFF8800;
D3:SMA(K3,3,1),COLORFF8800,LINETHICK2;
VAR13:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K1:SMA(VAR13,3,1)DOTLINE,COLORFFFFFF;
D1:SMA(K1,3,1),COLORFFFFFF,LINETHICK2;
VAR55:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;
K55:=SMA(VAR55,3,1),COLOR00FF00;
D55:=SMA(K55,3,1),COLOR008000;
周金:DRAWTEXT(CROSS( KDJ.K#WEEK (9,3,3), KDJ.D#WEEK (9,3,3)) ,20,'周买'),COLORRED;
周叉:DRAWTEXT(CROSS( KDJ.D#WEEK (9,3,3), KDJ.K#WEEK (9,3,3)) ,85,'周卖'),COLORGREEN;
月金:DRAWTEXT(CROSS( KDJ.K#MONTH (9,3,3), KDJ.D#MONTH (9,3,3)) ,20,'月买'),COLORWHITE;
月叉:DRAWTEXT(CROSS( KDJ.D#MONTH (9,3,3), KDJ.K#MONTH (9,3,3)) ,85,'月卖'),COLORYELLOW;
STICKLINE(月金,20,80,1,0),COLORBLUE;
DD:=-10;
20,DOTLINE; 80,DOTLINE;