参数N1(1.100.9)N2(1.100.5)
N:=5;{可调}
BB:=REF(CLOSE,N);
CC:=SMA(MAX(CLOSE-BB,0),2,1)/SMA(Abs(CLOSE-BB),2,1)*100-50;
DIFF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*500/EMA(CLOSE,26);
DEA:=EMA(DIFF,9);macd:=2*(DIFF-DEA);
DRAWBAND(-40,RGB(5,100,50),CC,0);
{以下为显示}
STICKLINE(MacD0,0,0,2,0),COLORDDDD00;
STICKLINE(MACD
STICKLINE(MACD>REF(MACD,1)AND MACD,0,0,2,0),COLOR00ddeE;
STICKLINE(MACD>REF(MACD,1)AND MACD>0,0,0,2,0),COLOR0000DD;
线:CC,COLORBLUE;
蓝天:STICKLINE(C,40,40,0.5,0.5),COLOREEEE00;
绿地:STICKLINE(C,-40,-40,0.5,0.5),COLOR00EE00;
涨家数:INDEXADV,COLOR0000EE,NODRAW;
跌家数:INDEXDEC,COLOR00EE00,NODRAW;
大盘成交:INDEXV,COLOR00EEEE,NODRAW;
mtm:=C-REF(C,1);
ZLGJ:100*EMA(EMA(MTM,N1),N1)/EMA(EMA(ABS(MTM),N1),N1),LINETHICK2,COLORRED;
MAZL:MA(ZLGJ,N2),COLORYELLOW;