全周期虚拟量(大智慧加密不限时)
虚拟量如果是日线,还好说一点,但是也解决不了开盘时量大虚高的问题,当然这个也好解决,但是在1分钟到60分钟就有很多问题,例如,源码要考虑周期结束时的暴量,又例如,星期天当交易时间等等,这个源码考虑的问题很多,是可以用来小周期预警的,好好对照一下吧
通达信的,这个是所有问题都没有去解决的,这么不喜欢加密用这个看看盘吧!!
A:=PERIOD;
N:=IF(A=0,1,IF(A=1,5,IF(A=2,15,IF(A=3,30,IF(A=4,60,IF(A=5,240,DRAWNULL))))));
M:=IF(N=1,IF(MOD(FROMOPEN,1)=0,1,MOD(FROMOPEN,1)),IF(N=5,IF(MOD(FROMOPEN,5)=0,5,MOD(FROMOPEN,5)),IF(N=15,IF(MOD(FROMOPEN,15)=0,15,MOD(FROMOPEN,15)),IF(N=30,IF(MOD(FROMOPEN,30)=0,30,MOD(FROMOPEN,30)),IF(N=60,IF(MOD(FROMOPEN,60)=0,60,MOD(FROMOPEN,60)),IF(N=240,FROMOPEN,DRAWNULL))))));
虚拟量:IF(CURRBARSCOUNT=1 AND A,VOL*N/M,VOL),NODRAW,COLORMAGENTA;
STICKLINE(CURRBARSCOUNT=1 AND N,虚拟量,0,-1,-1),COLOR00C0C0;
成交量:VOL,VOLSTICK;
MA5:MA(VOL,5),COLORMAGENTA;
MA35:MA(VOL,35),COLORYELLOW;
MA135:MA(VOL,135);
大智慧的,不加密,当然是我的淘汰品
开盘秒数:=IF(CURRENTDATE=DATE,if(CURRENTTIME>93000 and CURRENTTIME<150000,
if(CURRENTTIME<113000,(TIMETOT0(CURRENTTIME)-34200),
if(CURRENTTIME>130000,(TIMETOT0(CURRENTTIME)-39600),7200)),14400),0);
虚拟量:if(DATATYPE=8 ,vol*14400/开盘秒数,
if(DATATYPE=7,vol*3600/MOD(开盘秒数,3600),
if(DATATYPE=6,vol*1800/MOD(开盘秒数,1800),
if(DATATYPE=5,vol*900/MOD(开盘秒数,900),
if(DATATYPE=4,vol*300/MOD(开盘秒数,300),
if(DATATYPE=3,vol*60/MOD(开盘秒数,60),vol)))))),LINETHICK0,COLORYELLOW;
STICKLINE(BARSTATUS=2,虚拟量,VOL,7.3,01),COLOR00FFFF,DOTLINE,LAYER7;
成交量:VOL,VOLSTICK;
MA5:ma(vol,5);
MA10:ma(vol,10);
飞狐,当然也是我不用的
开盘秒数:=IF(CURRENTDATE=DATE,if(CURRENTTIME>93000 and CURRENTTIME<150000,
if(CURRENTTIME<113000,(TIMETOT0(CURRENTTIME)-34200),
if(CURRENTTIME>130000,(TIMETOT0(CURRENTTIME)-39600),7200)),14400),0);
虚拟量:if(DATATYPE=6,vol*14400/开盘秒数,
if(DATATYPE=5,vol*3600/MOD(开盘秒数,3600),
if(DATATYPE=4,vol*1800/MOD(开盘秒数,1800),
if(DATATYPE=3,vol*900/MOD(开盘秒数,900),
if(DATATYPE=2,vol*300/MOD(开盘秒数,300),
if(DATATYPE=1,vol*60/MOD(开盘秒数,60),vol)))))),LINETHICK0,COLORYELLOW;
STICKLINE(BARSTATUS=2,虚拟量,VOL,8,01),COLOR00FFFF,LINEDASHDOT;
成交量VOL:VOL,VOLSTICK;
MA5:ma(vol,5);
MA10:ma(vol,10);
|