A:=SUM(IF(CLOSE REF(CLOSE,1),vol,IF(CLOSE REF(CLOSE,1),-VOL,0)),0)/10000;
B:=MA(A,5);
A1:=BARSLAST(REF(crOSS(A,B),1));
B1:=REF(C,A1+1) C
AND
REF(A,A1+1) B
AND
CROSS(A,B);
DRAWTEXT(IF(B1 0,1,0),L-0.1,'obv底背离'),COLORGREEN;
A:=SUM(IF(CLOSE REF(CLOSE,1),vol,IF(CLOSE REF(CLOSE,1),-VOL,0)),0)/10000;
B:=MA(A,5);
A1:=BARSLAST(REF(crOSS(A,B),1));
B1:=REF(C,A1+1) C
AND
REF(A,A1+1) B
AND
CROSS(A,B);
DRAWTEXT(IF(B1 0,1,0),L-0.1,'obv底背离'),COLORGREEN;