把这个虚拟成交量公式改成选股公式
2019/12/2 18:53:34
公式编写说明:
M1 2 500 5M2 2 500 10TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,1)))));MTIME:=MOD(FROMOPEN,TOTAL);CTIME:=IF(MTIME<0.5,TOTAL,MTIME);VVOL:IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,DRAWNULL),NODRAW;STICKLINE(CURRBARSCOUNT=1 && (SETCODE=0 || SETCODE=1),VVOL,0,-1,-1),COLOR00C0C0;VOLUME:VOL,VOLSTICK;MAVOL1:MA(VOLUME,M1);MAVOL2:MA(VOLUME,M2)条件:要用虚拟量作为选股基础,不是即时量! 当虚拟量为前日量的5(可调???)倍就符合要求!我自己乱搞了一个,不知道错在哪里,选不了!老师们帮帮我谢谢!TOTAL:=IF(PERIOD=1,5,IF(PERIOD=2,15,IF(PERIOD=3,30,IF(PERIOD=4,60,IF(PERIOD=5,240,1)))));MTIME:=MOD(FROMOPEN,TOTAL);CTIME:=IF(MTIME<0.5,TOTAL,MTIME);VVOL:=IF(CURRBARSCOUNT=1,VOL*TOTAL/CTIME,DRAWNULL);VOLUME:=VOL;V5:=MA(VOLUME,M1);VVOL>V5*5;
公式源码回答:
total:=if(period=1,5,if(period=2,15,if(period=3,30,if(period=4,60,if(period=5,240,1)))));
mtime:=mod(fromopen,total);
ctime:=if(mtime<0.5,total,mtime);
vvol:=if(currbarscount=1,vol*total/ctime,drawnull);
vvol>ref(v,1)*5; {最后这样写即可, 若希望倍数可调, 在参数表设立参数n, 这句换成 vvol>ref(v,1)*n }
投股票 网 ww w.tou18.cn
股市公式下载推荐