VAR1:=OBV-MA(OBV,30);
VAR2:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);
STICKLINE(VAR1>0,0,VAR1,1,0),COLORRED;
STICKLINE(VAR1<0,0,VAR1,1,0),COLORCYAN;
OBV:SUM(IF(CLOSE=REF(CLOSE,1),0,VAR2),0),COLORWHITE;
OBV30:MA(OBV,30),COLORYELLOW;
VAR3:=OBV-OBV30;
VAR4:=BARSLAST(REF(CROSS(OBV,OBV30),1));
VAR5:=REF(CLOSE,VAR4+1)>CLOSE AND OBV>REF(OBV,VAR4+1) AND CROSS(OBV,OBV30);
VAR8:=BARSLAST(REF(CROSS(OBV30,OBV),1));
VAR9:=REF(C,VAR8+1)<C AND REF(OBV,VAR8+1)>OBV AND CROSS(OBV30,OBV);
STICKLINE(VAR3>0,OBV,OBV30,1,0),COLORRED;
STICKLINE(VAR3<0,OBV,OBV30,1,0),COLOR00FF00;
DRAWICON(CROSS(OBV,OBV30),OBV30,1);
DRAWICON(CROSS(OBV30,OBV),OBV30,2);
STICKLINE(OBV<REF(OBV,1),OBV30,OBV,1,0),COLORFFFF00;
STICKLINE(OBV>REF(OBV,1),OBV30,OBV,1,0),COLORFF00FF;
STICKLINE(VAR5,0,OBV,3,0),COLOR00FF00;
DRAWTEXT(VAR5,OBV30,' 底背离'),COLORWHITE;
DRAWTEXT(VAR9,OBV30,' 顶背离'),COLORWHITE;
OBV创新高是牛股:PLOYLINE(1,CONST(OBV)),COLOR008888,LINETHICK1;