在港股快车软件里有一种分析图形我挺喜欢的,就是量烛图,可惜国内市场常用的软件里没有这个功能。
于是我在之前做了个CCTV指标,这量烛图是该指标的其中一个功能,但因为不同于其他功能要先学习很多理论,量烛图这功能拿来就可以用,所以在这篇文章里专门独立出来,并放出源代码,股友们可以把这段代码添加到自己常用的主图指标前面,制作出适合自己的主图指标。
先来一张量烛图与正常K线图的效果对比:
不知道量烛图为何物的朋友看看上面的图也就知道了。好处就是可以在K线中直接看出当天的量能情况。咱不都提倡量能结合么
哦另外还参考通达信的VOL-TDX指标加入了盘中虚拟成交量的功能,这个功能懂的就用,不懂的话影响也不大,我就不细说了。
量烛图代码我放到文章末尾了。
建议使用方法:先任意选择一个自己常用的主图指标,比如MA,然后把量烛图的代码拷贝到MA源代码的最前面。就行了。
比如下面就是添加了量烛图功能的MA指标。(可千万不要有人来找我问我要MA指标啊。。)
{下面是量烛图的代码。作者:罗意}
VVOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);
WID:=VOL/CONST(HHV(VOL,120))*5;
VWID:=VVOL/CONST(HHV(VOL,120))*5;
STICKLINE(1,CLOSE,OPEN,-1,1),COLORBLACK;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5 AND VWID>5,OPEN,CLOSE,5.5,-1),COLOR00C0C0;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5 AND VWID>4 AND VWID<=5,OPEN,CLOSE,4.5,-1),COLOR00C0C0;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5 AND VWID>3 AND VWID<=4,OPEN,CLOSE,3.5,-1),COLOR00C0C0;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5 AND VWID>2 AND VWID<=3,OPEN,CLOSE,2.5,-1),COLOR00C0C0;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5 AND VWID>1 AND VWID<=2,OPEN,CLOSE,1.5,-1),COLOR00C0C0;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5 AND VWID<=1,OPEN,CLOSE,0.5,-1),COLOR00C0C0;
STICKLINE(CLOSE>OPEN AND WID>5,OPEN,CLOSE,5.5,1),COLORRED;
STICKLINE(CLOSE<OPEN AND WID>5,OPEN,CLOSE,5.5,0),COLORCYAN;
STICKLINE(CLOSE=OPEN AND WID>5,OPEN,CLOSE,5.5,1),COLORWHITE;
STICKLINE(CLOSE>OPEN AND WID>4 AND WID<=5,OPEN,CLOSE,4.5,1),COLORRED;
STICKLINE(CLOSE<OPEN AND WID>4 AND WID<=5,OPEN,CLOSE,4.5,0),COLORCYAN;
STICKLINE(CLOSE=OPEN AND WID>4 AND WID<=5,OPEN,CLOSE,4.5,1),COLORWHITE;
STICKLINE(CLOSE>OPEN AND WID>3 AND WID<=4,OPEN,CLOSE,3.5,1),COLORRED;
STICKLINE(CLOSE<OPEN AND WID>3 AND WID<=4,OPEN,CLOSE,3.5,0),COLORCYAN;
STICKLINE(CLOSE=OPEN AND WID>3 AND WID<=4,OPEN,CLOSE,3.5,1),COLORWHITE;
STICKLINE(CLOSE>OPEN AND WID>2 AND WID<=3,OPEN,CLOSE,2.5,1),COLORRED;
STICKLINE(CLOSE<OPEN AND WID>2 AND WID<=3,OPEN,CLOSE,2.5,0),COLORCYAN;
STICKLINE(CLOSE=OPEN AND WID>2 AND WID<=3,OPEN,CLOSE,2.5,1),COLORWHITE;
STICKLINE(CLOSE>OPEN AND WID>1 AND WID<=2,OPEN,CLOSE,1.5,1),COLORRED;
STICKLINE(CLOSE<OPEN AND WID>1 AND WID<=2,OPEN,CLOSE,1.5,0),COLORCYAN;
STICKLINE(CLOSE=OPEN AND WID>1 AND WID<=2,OPEN,CLOSE,1.5,1),COLORWHITE;
STICKLINE(CLOSE>OPEN AND WID<=1,OPEN,CLOSE,0.5,1),COLORRED;
STICKLINE(CLOSE<OPEN AND WID<=1,OPEN,CLOSE,0.5,0),COLORCYAN;
STICKLINE(CLOSE=OPEN AND WID<=1,OPEN,CLOSE,0.5,1),COLORWHITE; |