STICKLINE(MOBV>0,0,MOBV,1,0),COLORRED;
STICKLINE(MOBV<0,0,MOBV,1,0),COLORCYAN;
OBV高:=REF(OBV,BARSLAST(FILTER(BACKSET(FILTER(REF(OBV,5)=HHV(OBV,2*5+1),5),5+1),5)));
C高:=REF(C,BARSLAST(FILTER(BACKSET(FILTER(REF(C,5)=HHV(C,2*5+1),5),5+1),5))),NODRAW;
量入为主:CROSS(OBV,OBV高) AND H<C高,NODRAW;
STICKLINE(量入为主,0,MOBV,1,0),COLORYELLOW;
DRAWTEXT(量入为主,3*MOBV,'量'),COLORWHITE;
VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);
OBV:SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);
OBV30:MA(OBV,30);
OBV2:=OBV-OBV30;
STICKLINE(OBV2>0,OBV,OBV30,1,0),COLORRED;
STICKLINE(OBV2<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;
OBV牛股:PLOYLINE(1,CONST(OBV)),COLOR008888,LINETHICK1;
A1A:=BARSLAST(REF(CROSS(OBV,OBV30),1));
底背离:=REF(CLOSE,A1A+1)>CLOSE AND OBV>REF(OBV,A1A+1) AND CROSS(OBV,OBV30);
STICKLINE(底背离,0,OBV,3,0),COLOR00FF00;
底背:DRAWLINE(A1A=0,OBV30,底背离,OBV30,0),COLORYELLOW,LINETHICK4;
DRAWTEXT(底背离,OBV30,' 底背离'),COLORWHITE;
STICKLINE(底背离,OBV,OBV牛股,3,0),COLORRED;
A2A1:=BARSLAST(REF(CROSS(OBV30,OBV),1));
顶背离:=REF(CLOSE,A2A1+1)<CLOSE AND REF(OBV,A2A1+1)>OBV AND CROSS(OBV30,OBV);
顶背:DRAWLINE(A2A1=0,OBV30,顶背离,OBV30,0),COLORBLUE,LINETHICK4;
DRAWTEXT(顶背离,OBV30,' 顶背离'),COLORWHITE;
上榜资金:IF(FINANCE(3)==0,SCJYVALUE(16,1,0)-SCJYVALUE(16,2,0),GPJYVALUE(2,1,0)-GPJYVALUE(2,2,0)),NODRAW,COLORRED;
STICKLINE(上榜资金>0,0,588,2,0),COLORRED;
STICKLINE(上榜资金<0,0,588,2,0),COLORCYAN;
CJJ:=GPJYVALUE(5,1,0);
CJJ2:=IF(CJJ>0,CJJ,C);
减持:IF(FINANCE(3)==0,(SCJYVALUE(10,1,0)-SCJYVALUE(10,2,0)),(CJJ2*GPJYVALUE(5,2,0))/10000),NODRAW;
NOTEXT1:MA(减持,10)*2;
STICKLINE(减持>0,0,OBV,2,0),COLORRED;
STICKLINE(减持<0,0,OBV,2,0),COLORCYAN;
增持:IF(FINANCE(3)==0,SCJYVALUE(11,1,0)+SCJYVALUE(11,2,0),GPJYVALUE(4,2,0)),NODRAW;
溢额:IF(FINANCE(3)==0,SCJYVALUE(11,1,0),0);
STICKLINE(增持>0,MOBV,OBV,2,0),COLORBROWN;
STICKLINE(溢额>0,MOBV,0,2,0),COLORRED;