【资料名称】:修正的成交量公式(源码)介绍【资料描述】:
修正的成交量公式(源码)
修正了风尘秀吉的成交量公式中的错误,简化了显示方式,提高显示速度。
{总量:=VOL,NODRAW;}
{均换手率:=MA(VOL/CAPITAL*100,5),COLORFFFFFF,NODRAW;}
虚拟成交量:IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*210/FROMOPEN,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,虚拟成交量,0,2,-1),COLOR00C0C0;
TJ1:=H=L AND C>REF(C,1) OR C>REF(C,5) OR C>REF(C,9) OR C>REF(C,17);
TJ2:=H=L AND C<REF(C,1) OR C<REF(C,5) OR C<REF(C,9) OR C<REF(C,17);
EE:=IF(TJ1,0.0001,IF(TJ2,-0.0001,0)) {对付一字涨停,并求极限};
JGL_DTC:=(C-OPEN+EE)/(2*(H-L)+ABS(C-O)+3*0.0001);
主买:VOL*(1+JGL_DTC)/2,COLORRED,NODRAW {主动买};
主卖:VOL*(1-JGL_DTC)/2,COLORFFFF80,NODRAW {主动卖};
MAVOL5:MA(V,5),COLORWHITE;
MAVOL55:=MA(V,55),COLORBLUE;
MAVOL135:=MA(V,135),COLORGREEN;
DRAWICON(CROSS(MAVOL5,MAVOL55), VOL*1.05,1);
DRAWICON(CROSS(MAVOL5,MAVOL135),VOL*1.1, 13);
STICKLINE(C>=REF(C,1) AND MAVOL5<MAVOL135 AND V<MAVOL5,VOL,0,7,0),COLOR333333;
STICKLINE(C< REF(C,1) AND MAVOL5<MAVOL135 AND V<MAVOL5,VOL,0,7,0),COLOR333333;
{如果当天收市价低于昨天收市价,则画蓝色实体(蓝色为当天主动卖出量)}
STICKLINE(C<REF(C,1), 0,VOL,2,0), COLORFF0000;
{如果当天收市价高于昨天收市价则画绿色实体(绿色为当天主动卖出量)}
STICKLINE(C>=REF(C,1),0,VOL,2,0), COLOR00FF00;
{加红色实体(红色为当天主动买入量)}
STICKLINE(主买>0,0,主买,2,0),COLOR0000FF;
量增价平转阳:=VOL>REF(V,1) AND ABS(C-REF(C,1))/REF(C,1)<=0.005;
量增价升买入:=VOL>REF(V,1) AND C>REF(C,1);
量平价升续买:=ABS(VOL-REF(VOL,1))/REF(VOL,1)<=0.05 AND C>REF(C,1);
量减价升持有:=VOL<REF(V,1) AND C>REF(C,1);
量减价平警戒:=VOL<REF(V,1) AND ABS(C-REF(C,1))/REF(C,1)<=0.005;
量减价跌卖出:=VOL<REF(V,1) AND C<REF(C,1);
量平价跌续卖:=ABS(VOL-REF(VOL,1))/REF(VOL,1)<=0.05 AND C<REF(C,1);
量增价跌弃卖:=VOL>REF(V,1) AND C<REF(C,1);
量梯级递增上:=VOL>REF(V,1) AND REF(V,1)>REF(VOL,2);
量梯级递减下:=VOL<REF(V,1) AND REF(V,1)<REF(VOL,2);
ZGD:=HHV(V,80)*1;
ZGD2:=CONST(ZGD);
情况1:=CONST(IF(量增价平转阳,1,0));
情况2:=CONST(IF(量增价升买入,1,0));
情况3:=CONST(IF(量平价升续买,1,0));
情况4:=CONST(IF(量减价升持有,1,0));
情况5:=CONST(IF(量减价平警戒,1,0));
情况6:=CONST(IF(量减价跌卖出,1,0));
情况7:=CONST(IF(量平价跌续卖,1,0));
情况8:=CONST(IF(量增价跌弃卖,1,0));
情况9:=CONST(IF(量梯级递增上,1,0));
情况A:=CONST(IF(量梯级递减下,1,0));
DRAWTEXT(情况1=1 AND CURRBARSCOUNT=60,ZGD2-(ZGD2*0.1),'量增价平'),COLORMAGENTA;
DRAWTEXT(情况2=1 AND CURRBARSCOUNT=60,ZGD2-(ZGD2*0.4),'量增价升'),COLORMAGENTA;
DRAWTEXT(情况3=1 AND CURRBARSCOUNT=60,ZGD2-(ZGD2*0.2),'量平价升'),COLORMAGENTA;
DRAWTEXT(情况4=1 AND CURRBARSCOUNT=70,ZGD2-(ZGD2*0.3),'量减价升'),COLORMAGENTA;
DRAWTEXT(情况5=1 AND CURRBARSCOUNT=70,ZGD2-(ZGD2*0.1),'量减价平'),COLORMAGENTA;
DRAWTEXT(情况6=1 AND CURRBARSCOUNT=70,ZGD2-(ZGD2*0.3),'量减价跌'),COLORMAGENTA;
DRAWTEXT(情况7=1 AND CURRBARSCOUNT=60,ZGD2-(ZGD2*0.2),'量平价跌'),COLORMAGENTA;
DRAWTEXT(情况8=1 AND CURRBARSCOUNT=60,ZGD2-(ZGD2*0.4),'量增价跌'),COLORMAGENTA;
DRAWTEXT(情况9=1 AND CURRBARSCOUNT=60,ZGD2-(ZGD2*0.5),'量梯递增'),COLORMAGENTA;
DRAWTEXT(情况A=1 AND CURRBARSCOUNT=70,ZGD2-(ZGD2*0.5),'量梯递减'),COLORMAGENTA;
gd9066
【下载地址隐藏】: 点:回复可见地址