INPUT:LONG(26,20,100,1),SHORT(12,5,40,1),M(9,2,60,1);
VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主动卖盘:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2));
DIFF :=(EMA(V,SHORT) - EMA(V,LONG));
DEA :=(EMA(DIFF,M));
量MACD :(2*(DIFF-DEA)),COLORSTICK;
多方 :(EMA(主动买盘,SHORT) - EMA(主动买盘,LONG)),COLOR00FFFF,LINETHICK1;
BDEA :=(EMA(多方,M));
空方 :(EMA(主动卖盘,SHORT) - EMA(主动卖盘,LONG)),COLOR00FF00,LINETHICK1;
SDEA :=(EMA(空方,M));