通达信庄家多空公式
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;
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主买:IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL /2)),POINTDOT,COLORRED;
主卖:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL /2)),LINETHICK0,COLORGREEN;
换手率%:VOL/CAPITAL*100,POINTDOT,COLORWHITE;
净流:主买-主卖,NODRAW;
LS_JW:=(CLOSE+2*LOW+HIGH)/4;
力道:=(LS_JW-MA(CLOSE,20)),LINETHICK2,COLORWHITE;
STICKLINE(力道>0 ,0,VOL,2.5,1),COLORRED;
STICKLINE(力道<0,0,VOL,2.5,1),COLORGREEN;
做多:STICKLINE(主买>0,0,主买,2.5,0),COLORRED;
做空:STICKLINE(力道<0 AND 主买>0,0,主买,2.5,0),COLORGREEN;
五日:MA(VOL,5),COLORYELLOW;
十日:MA(VOL,10),COLORMAGENTA;