TAG:公式

 网友求助:

我对帖子里的这个公式很感兴趣,但我的通达信就是通不过,请高手帮忙看看。谢谢。附公式:
M1:=5;M2:=10;
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),NODRAW;
STICKLINE(CURRBARSCOUNT=1 && (SETCODE=0 || SETCODE=1),VVOL,0,-1,-1),COLOR00C0C0;
VOLUME:VOL,VOLSTICK;
MAVOL1:MA(VOLUME,M1);
MAVOL2:MA(VOLUME,M2);
DRAWNUMBER(CURRBARSCOUNT=2,V,V/CAPITAL*100),COLORYELLOW;
DRAWNUMBER(CURRBARSCOUNT=1,VVOL,VVOL/CAPITAL*100),COLORMAGENTA;
 

 

解答如下:

M1:=5;M2:=10;
VVOL:IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL),NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,VVOL,0,-1,-1),COLOR00C0C0;
VOLUME:VOL,VOLSTICK;
MAVOL1:MA(VOLUME,M1);
MAVOL2:MA(VOLUME,M2);
DRAWNUMBER(CURRBARSCOUNT=2,V,V/CAPITAL*100),COLORYELLOW;
DRAWNUMBER(CURRBARSCOUNT=1,VVOL,VVOL/CAPITAL*100),COLORMAGENTA;