预测量,网上早有源码;一品收集并稍加整理,写成常用软件的三种版本;其中原理,是根据交易时间来计算的,可以说基本准确,越接近收盘就与实际成交量越接近,还是值得一看的。下面源码,提供给大家作为盘中小参考:
(你也可以加在自己喜欢的量能指标后面)
C/C++ Code复制内容到剪贴板
- {预测量----大智慧L2版本,可直接加在VOL后面}
- %⑤:CAPITAL*5/100,COLORFFFFFF,DOTLINE;
- 交易分钟数:=if(CURRENTTIME>93000 and CURRENTTIME<150000,
- if(CURRENTTIME<113000,(TIMETOT0(CURRENTTIME)-34200)/60,
- if(CURRENTTIME>130000,(TIMETOT0(CURRENTTIME)-39600)/60,120)),240);
- 预测量:IF(BARSTATUS=2,VOL/交易分钟数*240,VOL),COLOR00FFFF,LINETHICK0;
- STICKLINE(BARSTATUS=2,0,预测量,8,1),COLOR00FFFF,DOTLINE,LAYER7;
C/C++ Code复制内容到剪贴板
- {预测量----飞狐版本,可直接加在VOL后面}
- ⑤%:CAPITAL*5/100,linedot;
- 交易分钟数:=if(CURRENTTIME>93000 and CURRENTTIME<150000,
- if(CURRENTTIME<113000,(TIMETOT0(CURRENTTIME)-34200)/60,
- if(CURRENTTIME>130000,(TIMETOT0(CURRENTTIME)-39600)/60,120)),240);
- 预测量:IF(BARSTATUS=2,VOL/交易分钟数*240,VOL),COLOR00FFFF,LINETHICK0;
- {预测量2:IF(BARSTATUS=2,VOL*240/OPENMINUTES(CURRENTTIME),VOL),COLOR00FF00,LINETHICK0;}
- STICKLINE(BARSTATUS=2,0,预测量,8,1),COLOR00FFFF,LINEDOT;
C/C++ Code复制内容到剪贴板
- {预测量----通达信版本,可重新建立一个指标VOL2}
- {M1:(1,100,5),M2:(1,100,10),M3:(1,100,20);}
- VOL1:VOL,VOLSTICK;
- MA1:MA(VOL,M1);
- MA2:MA(VOL,M2);
- MA3:MA(VOL,M3);
- ⑤%:CAPITAL*5/100,COLORFFFFFF,NODRAW;
- STICKLINE(C>0,⑤%,⑤%,5,-1),COLORFFFFFF;
- 交易分钟数:=IF(TIMETOSEC(TIME)>93000 AND TIMETOSEC(TIME)<150000,
- IF(TIMETOSEC(TIME)<113000,(SECTOTIME(TIME)-34200)/60,
- IF(TIMETOSEC(TIME)>130000,(SECTOTIME(TIME)-39600)/60,120)),240);
- 预测量:IF(ISLASTBAR,VOL/交易分钟数*240,VOL),COLOR00FFFF,NODRAW;
- {预测量2:IF(ISLASTBAR,VOL*240/FROMOPEN,VOL),COLOR00FF00,NODRAW;}
- STICKLINE(ISLASTBAR,0,预测量,3,-1),COLOR00FFFF;
- STICKLINE(ISLASTBAR,0,VOL,3,0),VOLSTICK;
图片参考: