EXP1:expma(CLOSE,12);
EXP2:EXPMA(CLOSE,50);
A3:=BArslAST(REF(crOSS(EXP1,EXP2),1));
Lwr底背离:=REF(C,A3+1)>C AND REF(EXP1,A3+1)>EXP1 AND CROSS(EXP1,EXP2);
底背离:DRAWTEXT(LWR底背离,EXP1,'LWR底背离'), COLORYELLOW;
底背:DRAWLINE(A3=0,EXP2,LWR底背离,EXP2,0),COLORRED,LINETHICK2;
C3:=BARSLAST(REF(CROSS(EXP2,EXP1),1));
LWR顶背离:=REF(C,C3+1)<C AND REF(EXP1,C3+1)<EXP1 AND CROSS(EXP2,EXP1);
顶背离:DRAWTEXT(LWR顶背离,EXP1,'LWR顶背离'), COLORYELLOW;
顶背:DRAWLINE(C3=0,EXP2,LWR顶背离,EXP2,0),COLORRED,LINETHICK2;