飞狐OBV选股公式
N:=13;
OBV:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);
BOLL:=MA(OBV,N);
UPPER:=BOLL+2*STD(OBV,N);
LOWER:=BOLL-2*STD(OBV,N);
xg1:OBV<UPPER;
N:=13;
OBV:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE<REF(CLOSE,1),-VOL,0)),0);
BOLL:=MA(OBV,N);
UPPER:=BOLL+2*STD(OBV,N);
LOWER:=BOLL-2*STD(OBV,N);
xg2:CROSS(OBV,UPPER);