LOWV:=LLV(LOW,15); HIGHV:=HHV(HIGH,15);
RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,5);
K:EMA(RSV,5);
D:MA(K,5);
A1:=BARSLAST(REF(CROSS(K,D),1));
底背离:REF(CLOSE,A1+1)>CLOSE AND K>REF(K,A1+1) AND CROSS(K,D);
DRAWLINE(A1=0,D,底背离,D,0),colorred,LINETHICK1;
A2:=BARSLAST(REF(CROSS(D,K),1));
顶背离:REF(CLOSE,A2+1)<CLOSE AND REF(D,A2+1)>D AND CROSS(D,K);
DRAWLINE(A2=0,D,顶背离,D,0),colorgreen,LINETHICK1;
DRAWTEXT(底背离>0,D-3,'背离'),colorred;
DRAWTEXT(顶背离>0,D-3,'背离'),colorgreen;
//分析家公式网www.fxjgsw.com
DRAWTEXT(CROSS(K,D) AND (D < 18),30,'买'),colorred;
STICKLINE(CROSS(K,D) AND (D < 18)=1,3,20,8,0),colorred;
DRAWTEXT(CROSS(D,K) AND (D > 80),70,'卖'),colorgreen;
STICKLINE(CROSS(D,K) AND (D > 80)=1,85,70,8,0),colorgreen;
|
