【大智慧】CYW+OBV分時(shí)指標(biāo)公式
攻城獅 2015.11.26 13:33
INPUT:K(1,0,20),P(1,0,20);
DRAWTEXTREL(0,10,’【CYW:K=’+K+’: OBV:P=’+P+’: 0不顯示】’),COLOR00FFFF,LINETHICK2;
DRAWTEXTabs(490,5,’【大盤指數(shù):’+NUMTOSTRN(“05引.大盤指數(shù)#DAY”,2)+’】【大盤漲跌:’+NUMTOSTRN(“05引.大盤漲跌#DAY”,2)+’】【大盤漲幅:’+NUMTOSTRN(“05引.大盤漲幅#DAY”,2)+’%】’),LINETHICK1,Color00ffFF,LAYER0;
DRAWTEXTABS(500,20,’【漲家數(shù):’+NUMTOSTRN(DYNAINFO(69),0)+ ‘】’),COLOR0000ff,LINETHICK1;
DRAWTEXTABS(625,20,’【平家數(shù):’+NUMTOSTRN(DYNAINFO(71),0)+ ‘】’),COLOR00FFff,LINETHICK1;
DRAWTEXTABS(740,20,’【跌家數(shù):’+NUMTOSTRN(DYNAINFO(70),0)+ ‘】’),COLOR00ff00,LINETHICK1;
DRAWRECTABS(490,35 ,490+(DYNAINFO(69)+DYNAINFO(71)+DYNAINFO(70))/2.59,42, rgb(0,255,0)),COLOR00ff00,LAYER4;
DRAWRECTABS(490,35 ,490+(DYNAINFO(69)+DYNAINFO(71))/2.59 ,42, rgb(255,255,0)),COLOR00FFFF,LAYER3;
DRAWRECTABS(490,35 ,490+(DYNAINFO(69))/2.5,42, rgb(255,0,0)),COLOR0000ff,LAYER2;
主動買D:DYNAINFO(23),Color0000ff,PRECIS0,linethick0;
主動賣D:DYNAINFO(22),Color00ff00,PRECIS0,linethick0;
DRAWRECTABS(490,60 ,490+(主動買D+主動賣D)/(主動買D+主動賣D)*370,67, rgb(0,255,0)),COLOR00ff00,LAYER4;
DRAWRECTABS(490,60 ,490+(主動買D)/(主動買D+主動賣D)*370 ,67, rgb(255,0,0)),COLOR0077FF,LAYER3;
DRAWTEXTabs(520,45,’【外盤買:’+NUMTOSTRN(主動買D/(主動買D+主動賣D)*100,1)+’%】’ ),LINETHICK2,Color0000FF,LAYER0;
DRAWTEXTabs(690,45,’【內(nèi)盤賣:’+NUMTOSTRN(主動賣D/(主動買D+主動賣D)*100,1)+’%】’ ),LINETHICK2,Color00FF00,LAYER0;
DRAWTEXTABS(520,68,IFS((主動買D-主動賣D) >= 0,’【外盤買-內(nèi)盤賣▄ ‘+NUMTOSTRN(主動買D-主動賣D,0)+’手】’,”)),linethick4,color0077FF;
DRAWTEXTABS(520,68,IFS((主動買D-主動賣D) < 0,'【外盤買-內(nèi)盤賣▄ '+NUMTOSTRN(主動買D-主動賣D,0)+'手】','')),linethick4,color00FF00;
DYNAINFO(3),COLOR0077ff,DOTLINE,layer0;
{均線}
tt:=BARSCOUNT(C);
zz:=SUM(AMOUNT,tt)/SUM(VOL*100,tt);
zz1:=BETWEEN(C/zz,1.05,0.95);
均線:IF(zz1=0,MA(C,TT),zz),COLOR00ffFF,linethick1,LAYER0;
{最高.最低}
H1:hhvall(hhv(C,0)),COLOR7077FF,CROSSDOT,LINETHICK1;
L1:llvall(llv(C,0)),COLOR00FF00,CROSSDOT,LINETHICK1;
DRAWTEXT(barstatus=2,DYNAINFO(5),’ 最高:’+NUMTOSTRN(DYNAINFO(5),2)+’元 ‘+NUMTOSTRN(100*(DYNAINFO(5)/DYNAINFO(3)-1),2)+’%’),linethick1,ALIGN0,VALIGN2,ColorFF00ff;
DRAWTEXT(barstatus=2,DYNAINFO(6),’ 最低:’+NUMTOSTRN(DYNAINFO(6),2)+’元 ‘+NUMTOSTRN(100*(DYNAINFO(6)/DYNAINFO(3)-1),2)+’%’),linethick1,ALIGN0,VALIGN2,colorgreen;
P1:=H1-L1;
阻力:L1+P1*7/8,COLOR00FF00;
支撐:L1+P1*0.5/8,COLOR00FF00;
FILLRGN(支撐,阻力,支撐<阻力,RGB(0,0,200)),LINETHICK2,LAYER6;
現(xiàn)價(jià):CLOSE,COLOR00FFFF,LINETHICK2,LAYER0;
DRAWTEXT(barstatus=2,DYNAINFO(7),’___’+NUMTOSTRN(DYNAINFO(7),2)+’元.委比:’+NUMTOSTRN(DYNAINFO(15)*100,0)+’%’),ALIGN0,VALIGN2,color00ffFF,LINETHICK4;
DRAWTEXT(LONGCROSS(支撐,現(xiàn)價(jià),2),支撐*1.001,’★’),COLOR00FF00,LINETHICK2;
DRAWTEXT(LONGCROSS(現(xiàn)價(jià),阻力,2),現(xiàn)價(jià),’★’),COLORRED,LINETHICK2;
DRAWTEXT(TIME=100000,C+0.01, NUMTOSTR(C)),Color00ffFF,LINETHICK3,align0;
分鐘數(shù)30:(TIME0=36000),PRECIS0,linethick0;
VERTLINE(分鐘數(shù)30,2),COLOR00FF00,LAYER4;
{疊加大盤}
TC:=STRCMP(STRLEFT(MARKETLABEL,2),’SZ’);
DPSH:=”SH000001$CLOSE”/HHV(STKINDI(‘SH000001′,’05引.RC#DAY’),0);
DPSZ:=”399001$CLOSE”/HHV(STKINDI(‘399001′,’05引.RC#DAY’),0);
DPC:=IF(INBLOCK(‘A股板塊’),DYNAINFO(3)*IF(C=0,DPSZ,DPSH),C);
POLYLINE(C>0,DPC),COLOR0000FF,LAYER0,linethick2;
{CYW}
YB:(L1+P1*0.5),COLORFF9900;
STICKLINE(CYW>=0,YB,YB+CYW*K,2,0 ),Color0000ff;
STICKLINE(CYW<0,YB,YB+CYW*K,2,0 ),Color00FF00;
{OBV}
OBVJ:=SUM(IF(CLOSE>REF(CLOSE,1),VOL,IF(CLOSE VA:=OBVJ/100000*P;
F:L1-P1*0.5;
STICKLINE(OBVJ>=0,F,F+VA,4,0 ),Color0000ff;
STICKLINE(OBVJ<0,F,F-VA,4,0 ),Color00FF00;
FILLRGN(F,L1,F
申明:本文為作者投稿或轉(zhuǎn)載,在概念股網(wǎng) http://www.chiang1015.com/ 上發(fā)表,為其獨(dú)立觀點(diǎn)。不代表本網(wǎng)立場,不代表本網(wǎng)贊同其觀點(diǎn),亦不對其真實(shí)性負(fù)責(zé),投資決策請建立在獨(dú)立思考之上。