通达信分时涨停OBV指标公式
背景: DRAWGBK(1,RGB(25,25,112),RGB(0,0,128),0,1,0);
量价:=(vol/CLOSE)/3;
统计主动买量:=SUM((IF(((量价>0.20) AND (CLOSE>(REF(CLOSE,1)))),量价,0)),0);
统计主动卖量:=SUM((IF(((量价>0.20) AND (CLOSE<(REF(CLOSE,1)))),量价,0)),0);
涨停量:((统计主动买量)/统计主动卖量)*10,NODRAW,COLORRED;
DRAWTEXT_FIX(1,0.04,0,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.05,0,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.06,0,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.07,0,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.08,0,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.04,0.1,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.05,0.1,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.06,0.1,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.07,0.1,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.08,0.1,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.04,0.2,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.05,0.2,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.06,0.2,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.07,0.2,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.08,0.2,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.04,0.3,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.05,0.3,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.06,0.3,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.07,0.3,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.08,0.3,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.04,0.4,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.05,0.4,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.06,0.4,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.07,0.4,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.08,0.4,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.04,0.5,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.05,0.5,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.06,0.5,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.07,0.5,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.08,0.5,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.04,0.6,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.05,0.6,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.06,0.6,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.07,0.6,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.08,0.6,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.04,0.7,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.05,0.7,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.06,0.7,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.07,0.7,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.08,0.7,0,'▇'),COLORGRAY;
DRAWTEXT_FIX(1,0.04,0.8,0,'▇'),COLORWHITE;
DRAWTEXT_FIX(1,0.05,0.8,0,'▇'),COLORWHITE;
DRAWTEXT_FIX(1,0.06,0.8,0,'▇'),COLORWHITE;
DRAWTEXT_FIX(1,0.07,0.8,0,'▇'),COLORWHITE;
DRAWTEXT_FIX(1,0.08,0.8,0,'▇'),COLORWHITE;
DRAWTEXT_FIX(1,0.04,0.9,0,'▇'),COLORWHITE;
DRAWTEXT_FIX(1,0.05,0.9,0,'▇'),COLORWHITE;
DRAWTEXT_FIX(1,0.06,0.9,0,'▇'),COLORWHITE;
DRAWTEXT_FIX(1,0.07,0.9,0,'▇'),COLORWHITE;
DRAWTEXT_FIX(1,0.08,0.9,0,'▇'),COLORWHITE;
DRAWTEXT_FIX(1,0.04,1,0,'▇'),COLORWHITE;
DRAWTEXT_FIX(1,0.05,1,0,'▇'),COLORWHITE;
DRAWTEXT_FIX(1,0.06,1,0,'▇'),COLORWHITE;
DRAWTEXT_FIX(1,0.07,1,0,'▇'),COLORWHITE;
DRAWTEXT_FIX(1,0.08,1,0,'▇'),COLORWHITE;
DRAWTEXT_FIX(涨停量>30,0.04,0,0,'▇'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.05,0,0,'▇'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.06,0,0,'▇'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.07,0,0,'▇'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.08,0,0,'▇'),COLORYELLOW;
DRAWNUMBER_FIX(涨停量 AND ISLAstBAR,0.04,0,0,涨停量),LINETHICK8,COLORRED;
DRAWTEXT_FIX(涨停量>30,0.04,0.1,0,'▇'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.05,0.1,0,'▇'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.06,0.1,0,'▇'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.07,0.1,0,'▇'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.08,0.1,0,'▇'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.04,0.2,0,'▇'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.05,0.2,0,'▇'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.06,0.2,0,'▇'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.07,0.2,0,'▇'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.08,0.2,0,'▇'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.03,0.2,0,'●'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.03,0.1,0,'●'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.03,0,0,'●'),COLORYELLOW;
DRAWTEXT_FIX(涨停量>30,0.08,0,0,' ←早盘obv值保持20,30以上出绿钻有涨停可能'),COLORYELLOW;
涨停量▇:=(统计主动买量/统计主动卖量)*40,LINETHICK2,NODRAW,COLORRED;
DRAWTEXT_FIX(20<涨停量▇ <30,0.04,0.3,0,'▇'),COLORRED;
DRAWTEXT_FIX(20<涨停量▇ <30,0.05,0.3,0,'▇'),COLORRED;
DRAWTEXT_FIX(20<涨停量▇ <30,0.06,0.3,0,'▇'),COLORRED;
DRAWTEXT_FIX(20<涨停量▇ <30,0.07,0.3,0,'▇'),COLORRED;
DRAWTEXT_FIX(20<涨停量▇ <30,0.08,0.3,0,'▇'),COLORRED;
DRAWTEXT_FIX(20<涨停量▇ <30,0.04,0.4,0,'▇'),COLORRED;
DRAWTEXT_FIX(20<涨停量▇ <30,0.05,0.4,0,'▇'),COLORRED;
DRAWTEXT_FIX(20<涨停量▇ <30,0.06,0.4,0,'▇'),COLORRED;
DRAWTEXT_FIX(20<涨停量▇ <30,0.07,0.4,0,'▇'),COLORRED;
DRAWTEXT_FIX(20<涨停量▇ <30,0.08,0.4,0,'▇'),COLORRED;
DRAWTEXT_FIX(20<涨停量▇ <30,0.04,0.5,0,'▇'),COLORRED;
DRAWTEXT_FIX(20<涨停量▇ <30,0.05,0.5,0,'▇'),COLORRED;
DRAWTEXT_FIX(20<涨停量▇ <30,0.06,0.5,0,'▇'),COLORRED;
DRAWTEXT_FIX(20<涨停量▇ <30,0.07,0.5,0,'▇'),COLORRED;
DRAWTEXT_FIX(20<涨停量▇ <30,0.08,0.5,0,'▇'),COLORRED;
OBV:= (expma(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*100, COLORSTICK;
主力:=EXPMA( (EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*100,120)-0.0004,LINETHICK5,COLORMAGENTA;
散户:=EXPMA( (EXPMA(CLOSE,500)-REF(EXPMA(CLOSE,500),1))/REF(EXPMA(CLOSE,500),1)*100,200),LINETHICK5,COLORGREEN;
DRAWICON(crOSS(EXPMA(OBV,120)-0.0004,EXPMA(OBV,200)),EXPMA(OBV,200)*1,27);