AX:=PERIOD;
BL:=IF(AX=0,150,IF(AX=1,50,IF(AX=2,30,IF(AX=3,17,IF(AX=4,15,IF(AX=5,8,
IF(AX=6,3,IF(AX=7,2,IF(AX=8,50,IF(AX=9,3,1.3))))))))));
FM:=(EMA(CLOSE,1.414*9+1));
FCL:=IF(FM<=0.05,ABS(FM)+0.1,0);
DIF:=(EMA(CLOSE,9)-EMA(CLOSE,2*9+2))/(FCL+FM)*60*BL*4+260,COLORLIRED,LINETHICK1;
DEA:=EMA(DIF,9*0.75),COLORGREEN,LINETHICK1;
MACD:=2*(DIF-DEA)+200;
STICKLINE(MACD>200 AND MACD<REF(MACD,1),200,MACD,1,0),COLORGREEN;
STICKLINE(MACD>200 AND MACD>REF(MACD,1),200,MACD,1,0),COLORMAGENTA;
STICKLINE(MACD<200 AND MACD<REF(MACD,1),200,MACD,1,1),COLORLIGREEN;
STICKLINE(MACD<200 AND MACD>REF(MACD,1),200,MACD,1,1),COLORFF00FF;
DRAWBAND(DIF,RGB(200,50,55),DEA,RGB(100,400,100));
DRAWTEXT(CROSS(DIF,DEA),DIF*0.93,'B'),COLORYELLOW;
L1:=(CLOSE-LLV(LOW,11))/(HHV(HIGH,11)-LLV(LOW,11))*100*4+10;
K:SMA(L1,3,1),COLORGRAY;
D:SMA(K,3,1),COLOR38B0DE;
W:IF(K>REF(K,1),K,DRAWNULL),COLORMAGENTA,LINETHICK2;
MAXV:=CONST(HHV(VOL,100));
MAXD:=CONST(MAX(ABS(HHV(DIF,100)),ABS(LLV(DIF,100))));
BS:=MAXV/MAXD*1.5;
CC:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN*0.8/BS,DRAWNULL);
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,CC,0,-1,-1),COLOR00C0C0;
AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
买盘:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+
(CLOSE-LOW)),VOL/2)),NODRAW;
买:买盘/10000,COLORRED,NODRAW;
卖盘:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,
0-AA*(HIGH-LOW),0-VOL/2)),NODRAW;
卖:卖盘/10000,COLORGREEN,NODRAW;
差额:(买盘+卖盘)/10000,COLORWHITE,NODRAW;
{BB:=(买盘+卖盘);}
三日净流入:SUM (差额,3),COLORMAGENTA,NODRAW;
STICKLINE(买盘>0 OR 卖盘<0 ,0,VOL/BS,2,0),COLORLICYAN;
STICKLINE(买盘>0,0,买盘/BS,2,0),COLORRED;