来函数检测结果如下:
该公式没有未来函数
指标源码:
原理解析:
B1赋值:1日前的OBV
B2赋值:2日前的OBV
B3赋值:3日前的OBV
B4赋值:4日前的OBV
CMAX赋值:OBV和B1较大值,B2),B3)
CMIN赋值:OBV和B1的较小值,B2),B3)
持股赋值:STICKLINE(OBV=CMAX AND (B1>=B2 OR B1>=B3) OR B1=CMAX AND (B2=CMIN OR B3=CMIN) AND OBV>=B2 OR B2=CMAX AND B3=CMIN AND OBV>=B1 OR B3=CMAX AND OBV>=B1 AND OBV>=B2,B1,OBV,3,0),画洋红色
当满足条件OBV=CMAX AND B1=CMIN时,在B2和OBV之间画柱状线
下跌赋值:STICKLINE(OBV=CMIN AND (B1< B2 OR B1< B3) OR B1=CMIN AND (B2=CMAX OR B3=CMAX) AND OBV< B2 OR B2=CMIN AND B3=CMAX AND OBV< B1 OR B3=CMIN AND OBV< B1 AND OBV< B2,B1,OBV,8,1),COLOR00FF00
当满足条件B1=CMAX AND OBV=CMIN时,在B2和OBV之间画柱状线
输出买入:STICKLINE(B1=CMIN AND OBV>=B2 OR (B2=CMIN AND B1<=B3 OR B3=CMIN AND B1<=B2) AND B2< B4 AND OBV>=B1,B1,B2,3,0),画红色
输出抛售:STICKLINE(B1=CMAX AND OBV< B2 OR (B2=CMAX AND B1>B3 OR B3=CMAX AND B1>B2) AND B2>=B4 AND OBV< B1,B1,B2,3,0), 画蓝色
输出V1:0日内OBV最高值
V3赋值:5日内OBV最高值
如果OBV=V3返回OBV否则返回DRAWNULL
如果OBV=V1返回OBV否则返回DRAWNULL
OBV的7日简单移动平均,画白色
OBV的21日简单移动平均,COLORLIBLUE
DRAWTEXT((((COUNT((收盘价 > 1日前的收盘价),30) > 18) AND (COUNT((收盘价 > 1日前的收盘价),3) = 3)) AND ((COUNT((OBV < 1日前的OBV),30) > 18) OR (COUNT((OBV < 1日前的OBV),3) = 3))),OBV,'买盘无力')
DRAWTEXT((OBV上穿0 AND (COUNT((1日前的OBV < 0),3) = 3)),OBV,'由负转正买入')
DRAWTEXT((0上穿OBV AND (COUNT((1日前的OBV > 0),3) = 3)),OBV,'由正转负卖出。')
DRAWTEXT(((20日内最高价最高值 = 最高价) AND NOT((20日内OBV最高值 = OBV))),OBV,'顶背离卖'),画绿色
DRAWTEXT(((20日内最低价最低值 = 最低价) AND NOT((20日内OBV最低值 = OBV))),OBV,'底背离买'),画红色
DRAWTEXT(((((OBV - 1日前的OBV的绝对值) / ABS(OBV的5日简单移动平均)) > 0.07) AND (OBV > 1日前的OBV)),OBV,'异常')