N:=20;
JJ1:=(HIGH+LOW+CLOSE)/3;
Q0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
Q1:=IF(CAPITAL=0,Q0*(JJ1-MIN(CLOSE,OPEN)),Q0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
Q2:=IF(CAPITAL=0,Q0*(MIN(OPEN,CLOSE)-LOW),Q0*IF(HIGH=LOW,1,(JJ1-MIN(CLOSE,OPEN))));
Q3:=IF(CAPITAL=0,Q0*(HIGH-MAX(OPEN,CLOSE)),Q0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
Q4:=IF(CAPITAL=0,Q0*(MAX(CLOSE,OPEN)-JJ1),Q0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ1)));
DDX:((Q1+Q2)-(Q3+Q4))/IF(CAPITAL=0,1000000,10000),COLOR00AAAA,LINETHICK,NODRAW;
DX:=MA(DDX,5)*N;
STICKLINE(DDX>0,0,DDX,2.5,0),COLORRED;
STICKLINE(DDX<0,0,DDX,2.5,0),COLORGREEN;
万:=AMOUNT/10000,COLORFF00FF,NODRAW;
VAR1:=AMOUNT/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
流入:IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),AMOUNT/2))/10000,COLORRED,NODRAW;
流出:IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-AMOUNT/2))/10000,COLOR00FF00,NODRAW;
净流入:流入+流出,COLORFFFF00,NODRAW;