当DEA上穿DIF时,为金叉,在图上该日显示O; 相反,死叉时显示X
LOWV:=LLV(LOW,9);
HIGHV:=HHV(HIGH,9);
RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,3);
K:EMA(RSV,3),COLORRED;
D:MA(K,3),COLORGRAY;
P:=(C-MA(C,5))*100/MA(C,5);
偏5线:IF(P>0,P,0),COLORYELLOW,NODRAW;
超买:IF(K>=80,K,100),COLORGREEN;
危险:IF(K>=90,K,100),COLORRED;
超卖:IF(K<20,K,0),COLORYELLOW;
DIF:EMA(CLOSE,12) - EMA(CLOSE,26),COLORWHITE,NODRAW;
DEA:EMA(DIF,9),COLORRED,NODRAW; {www.70822.com}
MACD:2*(DIF-DEA),COLORYELLOW,NODRAW;
DRAWTEXT(CROSS(DIF,DEA),10,'O'),COLORYELLOW;
DRAWTEXT(CROSS(DEA,DIF),10,'X'),COLORGREEN;