通达信公式源码 通达信好用的OBV公式源码
2015-4-17 10:51:40 股票入门 http://rumen.southmoney.com
P:=5;
VP:=IF(CAPITAL=0,AMOUNT/100000000,VOL);
VA:=IF(CLOSE》REF(CLOSE,1),VP,-VP);
OBV:SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0),LINETHICK2;
M12:EMA(OBV,12);
M50:EMA(OBV,50),LINETHICK2,COLOR00FF00;
A1:=REF(OBV,P)=HHV(OBV,2*P+1);
B1:=FILTER(A1,P);
C1:=BACKSET(B1,P+1);
D1:=FILTER(C1,P);A2:=REF(OBV,P)=LLV(OBV,2*P+1);
B2:=FILTER(A2,P);
C2:=BACKSET(B2,P+1);
D2:=FILTER(C2,P);上:REF(OBV,BARSLAST(D1)),COLORFF00FF,NODRAW;
下:REF(OBV,BARSLAST(D2)),COLOR00FF00,NODRAW;
向上:CROSS(OBV,上*1.01),NODRAW;
相对能量:(OBV-下)/(上-下)*100,COLORYELLOW,NODRAW;
R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);
S11:=R11》REF(R11,1);
DRAWLINE(D1,OBV,S11,OBV,1),COLORYELLOW;
T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
U11:=T11》REF(T11,1);
DRAWLINE(D2,OBV,U11,OBV,1),COLOR00FF00;
STICKLINE(C》0,下,下,1,0),COLOR00FF00;
STICKLINE(C》0,上,上,1,0),COLORFF00FF;
DRAWTEXT(CROSS(OBV,上*1.01),上,上),COLORYELLOW;
DRAWTEXT(CROSS(下*0.99,OBV),下,下),COLORYELLOW;
DRAWICON(D1,OBV,1);
DRAWICON(D2,OBV,2);
IF(M12》M50,M12,DRAWNULL),COLORFFFF00;
IF(M50》REF(M50,1),M50,DRAWNULL),COLORRED,LINETHICK2;
股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。