最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信OBV解析指标公式

    正文概述    2024-05-04 04:18:07  
    暂未发现存在未来函数



    通达信OBV解析指标公式源码:


    INPUT:K(1,0,20),P(1,0,20); DRAWTEXTREL(0,10,'【cyw:K='+K+':obv:P='+P+':0不显示】'),COLOR00FFFF,LINETHICK2; DRAWTEXTabs(490,5,'【指数:'+NUMTOstRN("05引.大盘指数#DAY",2)+'】【大盘涨跌:'+NUMTOSTRN("05引.大盘涨跌#DAY",2)+'】【大盘涨幅:'+NUMTOSTRN("05引.大盘涨幅#DAY",2)+'%】'),LINETHICK1,Color00ffFF,LAYER0; DRAWTEXTABS(500,20,'【涨家数:'+NUMTOSTRN(DYNAINFO(69),0)+'】'),COLOR0000ff,LINETHICK1; DRAWTEXTABS(625,20,'【平家数:'+NUMTOSTRN(DYNAINFO(71),0)+'】'),COLOR00FFff,LINETHICK1; DRAWTEXTABS(740,20,'【跌家数:'+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,'【内盘卖:'+NUMTOSTRN(主动卖D/(主动买D+主动卖D)*100,1)+'%】'),LINETHICK2,Color00FF00,LAYER0; DRAWTEXTABS(520,68,IFS((主动买D-主动卖D) =0,'【外盘买-内盘卖▄'+NUMTOSTRN(主动买D-主动卖D,0)+'手】','')),linethick4,color0077FF; DRAWTEXTABS(520,68,IFS((主动买D-主动卖D) 0,'【外盘买-内盘卖▄'+NUMTOSTRN(主动买D-主动卖D,0)+'手】','')),linethick4,color00FF00; DYNAINFO(3),COLOR0077ff,DOTLINE,layer0; {} tt:=BARSCOUNT(C); zz:=SUM(AMOUNT,tt)/SUM(*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; 现价:CLOSE,COLOR00FFFF,LINETHICK2,LAYER0; DRAWTEXT(barstatus=2,DYNAINFO(7),'___'+NUMTOSTRN(DYNAINFO(7),2)+'元.委比:'+NUMTOSTRN(DYNAINFO(15)*100,0)+'%'),ALIGN0,VALIGN2,color00ffFF,LINETHICK4; DRAWTEXT(LONGCROSS(支撑,现价,2),支撑*1.001,'★'),COLOR00FF00,LINETHICK2; DRAWTEXT(LONGCROSS(现价,阻力,2),现价,'★'),COLORRED,LINETHICK2; DRAWTEXT(TIME=100000,C+0.01,NUMTOSTR(C)),Color00ffFF,LINETHICK3,align0; 分钟数30:(TIME0=36000),PRECIS0,linethick0; VERTLINE(分钟数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 REF(CLOSE,1),-VOL,0)),0); 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 L1,RGB(60,0,60)),LINETHICK2,LAYER7; N1:=5;N2:=13;N3:=21; OBV:=SUM(IF(C REF(C,1),VOL,IF(C REF(C,1),-VOL,0)),0); OBV1:EMA(OBV,N1),COLORGREEN; OBV2:EMA(OBV1,N2); OBV3:EMA(OBV2,N3),COLORCYAN; BVC:3*OBV1-2*OBV2,COLORRED; STICKLINE(BVC OBV2,BVC,OBV2,0.00001,1),COLORRED; STICKLINE(BVC OBV2,BVC,OBV2,0.00001,1),COLORWHITE;




    [源码注释]通达信OBV解析指标公式公式解读



    输出INPUT:K(1,0,20),P(1,0,20) 输出输出输出输出DRAWTEXTREL(0,10,'【CYW:K='+K+':OBV:P='+P+':0不显示】'),COLOR00FFFF,线宽为2 输出输出输出DRAWTEXTABS(490,5,'【大盘指数:'+NUMTOSTRN("05引.大盘指数[取日线数据]",2)+'】【大盘涨跌:'+NUMTOSTRN("05引.大盘涨跌[取日线数据]",2)+'】【大盘涨幅:'+NUMTOSTRN("05引.大盘涨幅[取日线数据]",2)+'%】'),线宽为1,COLOR00FFFF,LAYER0 输出DRAWTEXTABS(500,20,'【涨家数:'+NUMTOSTRN(DYNAINFO(69),0)+'】'),COLOR0000FF,线宽为1 输出DRAWTEXTABS(625,20,'【平家数:'+NUMTOSTRN(买二价,0)+'】'),COLOR00FFFF,线宽为1 输出DRAWTEXTABS(740,20,'【跌家数:'+NUMTOSTRN(DYNAINFO(70),0)+'】'),COLOR00FF00,线宽为1 DRAWRECTABS(490,35,490+(DYNAINFO(69)+买二价+DYNAINFO(70))/2.59,42,自定色),COLOR00FF00,LAYER4 DRAWRECTABS(490,35,490+(DYNAINFO(69)+买二价)/2.59,42,自定色),COLOR00FFFF,LAYER3 DRAWRECTABS(490,35,490+(DYNAINFO(69))/2.5,42,自定色),COLOR0000FF,LAYER2 输出主动买D:外盘/板块指数数,COLOR0000FF,PRECIS0,线宽为0 输出主动卖D:内盘/板块指数跌停数,COLOR00FF00,PRECIS0,线宽为0 DRAWRECTABS(490,60,490+(主动买D+主动卖D)/(主动买D+主动卖D)*370,67,自定色),COLOR00FF00,LAYER4 DRAWRECTABS(490,60,490+(主动买D)/(主动买D+主动卖D)*370,67,自定色),COLOR0077FF,LAYER3 输出DRAWTEXTABS(520,45,'【外盘买:'+NUMTOSTRN(主动买D/(主动买D+主动卖D)*100,1)+'%】'),线宽为2,COLOR0000FF,LAYER0 输出DRAWTEXTABS(690,45,'【内盘卖:'+NUMTOSTRN(主动卖D/(主动买D+主动卖D)*100,1)+'%】'),线宽为2,COLOR00FF00,LAYER0 TT赋值:收盘价的有效数据周期数 ZZ赋值:成交额(元)的TT日累和/(手)*100的TT日累和 ZZ1赋值:收盘价/ZZ位于1.05和0.95之间 输出均线:如果ZZ1=0,返回收盘价的TT日简单移动平均,否则返回ZZ,COLOR00FFFF,线宽为1,LAYER0 输出H1:HHVALL(0日内收盘价的最高值),COLOR7077FF,CROSSDOT,线宽为1 输出L1:LLVALL(0日内收盘价的最低值),COLOR00FF00,CROSSDOT,线宽为1 当满足条件数据位置状态=2时,在最高价位置书写文字,线宽为1,ALIGN0,VALIGN2,COLORFF00FF 当满足条件数据位置状态=2时,在最低价位置书写文字,线宽为1,ALIGN0,VALIGN2,画绿色 P1赋值:H1-L1 输出阻力:L1+P1*7/8,COLOR00FF00 输出支撑:L1+P1*0.5/8,COLOR00FF00 FILLRGN(支撑,阻力,支撑 阻力,自定色),线宽为2,LAYER6 输出现价:收盘价,COLOR00FFFF,线宽为2,LAYER0 当满足条件数据位置状态=2时,在现价位置书写文字,ALIGN0,VALIGN2,COLOR00FFFF,线宽为4 当满足条件支撑小于现价保持2个交易日后交叉上穿时,在支撑*1.001位置书写文字,COLOR00FF00,线宽为2 当满足条件现价小于阻力保持2个交易日后交叉上穿时,在现价位置书写文字,画红色,线宽为2 当满足条件时间(时分)=100000时,在收盘价+0.01位置书写文字,COLOR00FFFF,线宽为3,ALIGN0 输出分钟数30:(TIME0=36000),PRECIS0,线宽为0 VERTLINE(分钟数30,2),COLOR00FF00,LAYER4 TC赋值:字符串比较 DPSH赋值:"SH000001$收盘价"/0日内STKINDI('SH000001','05引.RC[取日线数据]')的最高值 DPSZ赋值:"399001$收盘价"/0日内STKINDI('399001','05引.RC[取日线数据]')的最高值 DPC赋值:如果属于某板块,返回昨收盘价*如果收盘价=0,返回DPSZ,否则返回DPSH,否则返回收盘价 POLYLINE(收盘价 0,DPC),COLOR0000FF,LAYER0,线宽为2 输出YB:(L1+P1*0.5),COLORFF9900 当满足条件控盘 =0时,在YB和YB+主力控盘*K位置之间画柱状线,宽度为2,0不为0则画空心柱.,COLOR0000FF 当满足条件主力控盘 0时,在YB和YB+主力控盘*K位置之间画柱状线,宽度为2,0不为0则画空心柱.,COLOR00FF00 OBVJ赋值:如果收盘价 1日前的收盘价,返回成交量(手),否则返回如果收盘价 1日前的收盘价,返回-成交量(手),否则返回0的历史累和 VA赋值:OBVJ/100000*P 输出F:L1-P1*0.5 当满足条件OBVJ =0时,在F和F+VA位置之间画柱状线,宽度为4,0不为0则画空心柱.,COLOR0000FF 当满足条件OBVJ 0时,在F和F-VA位置之间画柱状线,宽度为4,0不为0则画空心柱.,COLOR00FF00 FILLRGN(F,L1,F L1,自定色),线宽为2,LAYER7 N1赋值:5 N2赋值:13 N3赋值:21 OBV赋值:如果收盘价 ,返回?,否则返回?的?日累和 1日前的收盘价,成交量(手),如果收盘价 ,返回?,否则返回? 1日前的收盘价,-成交量(手),0)),0) 输出OBV1:OBV的N1日指数移动平均,画绿色 输出OBV2:OBV1的N2日指数移动平均 输出OBV3:OBV2的N3日指数移动平均,画青色 输出BVC:3*OBV1-2*OBV2,画红色 当满足条件BVC 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. OBV2,BVC,OBV2,0.00001,1),画红色 当满足条件BVC 时,在?和?位置之间画柱状线,宽度为?,?不为0则画空心柱. OBV2,BVC,OBV2,0.00001,1),画白色



    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信OBV解析指标公式 加入收藏