同花顺自用经典MACD指标公式

DRAWGBKLAST(C>0,STRIP(RGB(145,145,185),RGB(140,140,180),1));
N1:=10; N2:=22; M:=7.5;
DIF:(EMA(C,N1)-EMA(C,N2))/(1+EMA(Abs(C),512))*7.5,COLOR0000FF;
DEA:EMA(DIF,M),COLOR09FFFF;
macd:=2*(DIF-DEA),COLORSTICK;
PARTLINE(DIF,DIF>=REF(DIF,1),RGB(250,0,0),DIF<REF(DIF,1),RGB(0,0,250)),linethick1;
均衡:SMA(DIF,4,2),Color00FF00,LINETHICK1;
随行:IF(MacD< 0,MACD,0),ColorFFFFFF,LINETHICK1;
D2:=MACD;
STICKLINE(D2<REF(D2,1)AND D2>0,0,D2,5,0),Color979700;
STICKLINE(D2<REF(D2,1)AND D2>0,0,D2,4,0),ColorB5B500;
STICKLINE(D2<REF(D2,1)AND D2>0,0,D2,3,0),ColorD2D200;//兰
STICKLINE(D2<REF(D2,1)AND D2<0,0,D2,5,0),Color974B00;
STICKLINE(D2<REF(D2,1)AND D2<0,0,D2,4,0),ColorB55A00;
STICKLINE(D2<REF(D2,1)AND D2<0,0,D2,3,0),ColorD26900;//蓝
STICKLINE(D2>REF(D2,1)AND D2,0,D2,5,0),Color97004B;
STICKLINE(D2>REF(D2,1)AND D2,0,D2,4,0),ColorB5005A;
STICKLINE(D2>REF(D2,1)AND D2,0,D2,3,0),ColorD20069;//紫
STICKLINE(D2>REF(D2,1)AND D2>0,0,D2,5,0),Color970097;
STICKLINE(D2>REF(D2,1)AND D2>0,0,D2,4,0),ColorB500B5;
STICKLINE(D2>REF(D2,1)AND D2>0,0,D2,3,0),ColorD200D2;//粉
VAR1:=(EMA(C,N1)-REF(EMA(C,N1),1))/REF(EMA(C,N1),1);
VAR2:=(EMA(C,N2)-REF(EMA(C,N2),1))/REF(EMA(C,N2),1);
STICKLINE(VAR1>=VAR2 AND VAR2>0 AND C>EMA(C,N2),0,MACD,5,1),COLOR000066;
STICKLINE(VAR1>=VAR2 AND VAR2>0 AND C>EMA(C,N2),0,MACD,4,1),COLOR000077;
STICKLINE(VAR1>=VAR2 AND VAR2>0 AND C>EMA(C,N2),0,MACD,3,1),COLOR000099;
A:=MACD>0;
绿柱数:=BArslAST(A)=5;
STICKLINE(绿柱数>REF(D2,1)AND 绿柱数>=0,0,D2,5,0),COLOR00AA00;
STICKLINE(绿柱数>REF(D2,1)AND 绿柱数>=0,0,D2,4,0),COLOR00CC00;
STICKLINE(绿柱数>REF(D2,1)AND 绿柱数>=0,0,D2,3,0),COLOR00EE00;//绿柱
OSC:=100*(CLOSE-MA(CLOSE,11.5));
MaoSC:=EMA(OSC,4.5);
STICKLINE(MACD<REF(MACD,1)AND crOSS(MAOSC,OSC),0,MACD,5,0),COLORFF0000;
STICKLINE(MACD>REF(MACD,1)AND CROSS(OSC,MAOSC),0,MACD,5,0),COLOR09FFFF;




来函数检测结果如下:
该公式没有未来函数

解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图