DIF12:=(EMA(CLOSE,12)-EMA(CLOSE,26))/((EMA(CLOSE,12)+EMA(CLOSE,26))/2)*100;
DEA12:=EMA(DIF12,9);
相对macd:=2*(DIF12-DEA12);
kdIF12:=3*(DIF12-DEA12);{KDIF12:=2*(DIF12-DEA12)};
KDEA12:=SMA(KDIF12,8,3);
买卖力道:=2*(KDIF12-KDEA12),COLORLIRED,LINETHICK1;
相对DEA:=DEA12,COLORGREEN,LINETHICK2;
微分DEA:=KDEA12,COLORLIGRAY,LINETHICK1;
{ _通达信指标公式}
低15:LLV(相对MacD,15),LINETHICK2,COLORLIGREEN;
高21:HHV(相对MACD,21),LINETHICK2,COLORLIBLUE;
DRAWBAND(低15,RGB(250,100,150),相对MACD,RGB(250,100,150));
DRAWBAND(高21,RGB(150,150,250),相对MACD,RGB(150,150,250));
STICKLINE(相对MACD0,0,相对MACD,2.5,1),COLOR00BBFF;
STICKLINE(相对MACD>=REF(相对MACD,1)AND 相对MACD>0,0,相对MACD,2.5,1),COLOR0000CC;
STICKLINE(相对MACD>REF(相对MACD,1)AND 相对MACD<0,0,相对MACD,2.5,1),COLORBB11BB;
STICKLINE(相对MACD<=REF(相对MACD,1)AND 相对MACD<0,0,相对MACD,2.5,1),COLORFFBB11;
相对DIF:=DIF12,COLORMAGENTA,LINETHICK2;
微分DIF:KDIF12,COLORYELLOW,LINETHICK2;
高15:HHV(相对MACD,15),LINETHICK2,COLORLIBLUE;
低60:LLV(相对MACD,60),LINETHICK2,COLORWHITE;
高60:HHV(相对MACD,60),LINETHICK2,COLORBLUE;
DRAWICON(crOSS(微分DIF,低60),低60,38);
DRAWICON(CROSS(微分DIF,低15),低15,38);
DRAWICON(微分DIF>高60 AND 微分DIF
DRAWICON(相对MACD<0,0,39);
DRAWICON(相对MACD>0,0,38);
XG1:CROSS(微分DIF,低60);
XG2:CROSS(微分DIF,低15);