【通達(dá)信】OBV突破指標(biāo)公式
攻城獅 2015.11.08 22:51
P:=5;
VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);
OBV:SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);
MAOBV5:MA(OBV,5);
MAOBV20:MA(OBV,20);
AA1:=REF(OBV,P)=HHV(OBV,2*P+1);
BB1:=FILTER(AA1,P);
CC1:=BACKSET(BB1,P+1);
DD1:=FILTER(CC1,P);{高點(diǎn)}
AA2:=REF(OBV,P)=LLV(OBV,2*P+1);
BB2:=FILTER(AA2,P);
CC2:=BACKSET(BB2,P+1);
DD2:=FILTER(CC2,P);{低點(diǎn)}
前期高點(diǎn):REF(OBV,BARSLAST(DD1)),COLORFF00FF,NODRAW;
前期低點(diǎn):REF(OBV,BARSLAST(DD2)),COLOR00FF00,NODRAW;
相對(duì)能量:(OBV-前期低點(diǎn))/(前期高點(diǎn)-前期低點(diǎn))*100,COLORYELLOW,NODRAW;
R11:=BACKSET(ISLASTBAR,BARSLAST(DD1)+1);
S11:=R11>REF(R11,1);
DRAWLINE(DD1,OBV,S11,OBV,1),COLORYELLOW;
T11:=BACKSET(ISLASTBAR,BARSLAST(DD2)+1);
U11:=T11>REF(T11,1);
DRAWLINE(DD2,OBV,U11,OBV,1),COLOR00FF00;
STICKLINE(C>0,前期低點(diǎn),前期低點(diǎn),1,0),COLOR00FF00;
STICKLINE(C>0,前期高點(diǎn),前期高點(diǎn),1,0),COLORFF00FF;
DRAWICON(CROSS(OBV,前期高點(diǎn)),OBV,1);
申明:本文為作者投稿或轉(zhuǎn)載,在概念股網(wǎng) http://m.chiang1015.com/ 上發(fā)表,為其獨(dú)立觀點(diǎn)。不代表本網(wǎng)立場(chǎng),不代表本網(wǎng)贊同其觀點(diǎn),亦不對(duì)其真實(shí)性負(fù)責(zé),投資決策請(qǐng)建立在獨(dú)立思考之上。