上轨:sma(sma(hhv(HIGH,9),3,1),3,1),{COLORGREEN};
下轨: sma(sma(llv(LOW,9),3,1),3,1),{COLORYELLOW};
K:SMA(c,3,1),{COLORMAGENTA};
D: SMA(K,3,1),COLORWHITE;
partline(上轨>=ref(上轨,1),上轨),colorred,LINETHICK1;
partline(上轨<ref(上轨,1),上轨),colorgreen,LINETHICK1;
partline(下轨>=ref(下轨,1),下轨),colorred,LINETHICK1;
partline(下轨<ref(下轨,1),下轨),colorgreen,LINETHICK1;
partline(K>=ref(K,1),K),COLORMAGENTA,LINETHICK2;
partline(K<ref(K,1),K),COLORYELLOW,LINETHICK2;
partline(D>=ref(D,1),D),coloRffff00,LINETHICK1;
partline(D<ref(D,1),D),COLORBROWN,LINETHICK2;
DRAWTEXT(cross(K,D),D,'B'),COLORred;
DRAWTEXT(cross(D,K),D,'S'),COLORyellow;
|