AA:=vol/((HIGH-LOW)*2-Abs(CLOSE-OPEN));
主买:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
DIFF:(EMA(主买,5)-EMA(主买,20))/EMA(主买,20)*100;
DEA:EMA(DIFF,10);
macd:2*(DIFF-DEA), COLORSTICK,LINETHICK3;
STICKLINE(MacD>ref(MACD,1) and MACD<0,0,MACD,3,0 )colormagenta;
polyline(1,3),colorwhite;