{流氓OBV}DRAWGBK(C>0, RGB(40,120,20),RGB(00,00,00),0,0,1),LINETHICK2;
OBV0:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE
OBV:=OBV0/100000;
MA30:=MA(OBV,30);
SUB:OBV-MA30,LINETHICK2;
(SUB,SUB>=REF(SUB,1),RGB(255,0,0),SUB
长均:MA(SUB,L),COLORBLUE,LINETHICK4;
中均:MA(SUB,20),COLORFF00FF,LINETHICK2;
短均:MA(SUB,5),COLOR00FFFF,LINETHICK2;
STICKLINE(中均>长均 AND REF(中均,1)
STICKLINE(REF(中均,1)>REF(短均,1) AND 短均>=中均,中均,0,2,1),COLORFF00F2;
(短均,SUB,短均SUB,RGB(0,50,180));
(长均,短均,长均<短均,RGB(200,0,100),长均>短均,RGB(0,100,100));
TY:=SUB;
AA1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(AA1,10); C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);
AA2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(AA2,10); C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);
AB:=REF(SUB,BARSLAST(HD));
T1:=BARSLAST(HD)
峰:IF(T1,AB,AB),COLORYELLOW,POINTDOT;
0,COLORFF99FF;
DIF:=EMA(C,5)-EMA(C,13);
DEA:=EMA(DIF,9);
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
C01:=BARSLAST(REF(CROSS(DEA,DIF),1));
底背离:REF(C,A1+1)>C AND REF(DIF,A1+1)
DRAWTEXT(底背离>0,15,'←底背离'),COLORWHITE;
DRAWTEXT(顶背离>0,15,'←顶背离'),COLORWHITE;