LOWV:=LLV(LOW,9);
HIGHV:=HHV(HIGH,9);
RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,3);
K:EMA(RSV,3);
D:MA(K,3);
E:=REF(D,1);
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 AND D=LLV(D,1),E,底背离,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,E,顶背离,E,0),COLORGREEN,LINETHICK1;