MACD Classic Smoothed
- Indicators
- Shahabeddin Baset
- Version: 1.0
Classic MACD
- It has MACD line, Signal line, and Histogram.
- The Histogram has 4 colors, showing its movement direction as simple as possible.
- The smoothing factor in the input helps to eliminate noisy signals.
- Besides different price types (hlc, hlcc, ohlc, ...), there is an option to use volume data as the source for MACD calculations (which is better to be used by real volume not unreliable tick volume).
- While the original MACD indicator uses Exponential Moving Average, this indicator provides the flexibility to choose from various moving average methods, including SMA, SMMA, and LWMA.
-
There are two true/false options to show/hide MACD & Signal lines.
I believe this covers all functionalities available with the MACD indicator without additional customization. Enjoy your trading experience, and feel free to share your comments and reviews to make me happy.
指标非常不错,可靠性高。N:=3;DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);KX:=BARSSINCE(CLOSE);HHN:=CONST(HHV(DIFF,KX));HLN:=CONST(LLV(DEA,KX));RC1:=CONST((HHN+HLN)/2);SS:=((HHN-HLN)/200);MACD底部:=(-100*SS+RC1)+-(-100*SS+RC1),COLOR669999;MACD顶部:=(100*SS+RC1)+-(-100*SS+RC1),COLORFF0033;MACD中轴:=0+-(-100*SS+RC1);DIFF修正:=DIFF+-(-100*SS+RC1),COLOR008080;DEA修正:=DEA+-(-100*SS+RC1),COLOR00FF00;MACD修正1:=2*(DIFF修正-DEA修正)+MACD中轴,COLOR0000BB,NODRAW;MACD修正2:= EMA(MACD修正1,3);MACD超跌:=CONST(LLV(MACD修正1,KX));MACD超跌线:=IF(MACD超跌< MACD底部,MACD超跌,MACD底部);顶部:=MACD顶部+-MACD超跌线;天际:=顶部*0.809;中轴:=MACD中轴+-MACD超跌线;海面:=顶部*0.191;底部:=MACD底部; DIF55:=(EMA(CLOSE,55)-EMA(CLOSE,119))*0.55;DEA55:=(EMA(DIF55,41));DRAWBAND(DEA55,RGB(0,255,0),DIF55,RGB(255,0,255));DIF60:=EMA(CLOSE,12/2)-EMA(CLOSE,26/2);DEA60:=EMA(DIF60,9/2);DRAWBAND(DEA60,RGB(0,255,255),DIF60,RGB(255,255,0));AA:=REF(DIF60,N)=HHV(DIF60,2*N+1);BB:= (AA,N+1);CC:=FILTER(BB,N) AND DIF60=HHV(DIF60,N+1);A11:=BARSLAST(REF(CC,1));顶背离:=REF(CLOSE,A11+1)< CLOSE AND REF(DIF60,A11+1)>DIF60 AND CC;MACD多头:DIFF修正+-MACD超跌线,COLOR339999;空头:DEA修正+-MACD超跌线,COLOR00FF00;量能柱:2*(MACD多头-空头)+中轴,COLOR0000BB,NODRAW;超前DEA:=(EMA(MACD多头,7)); 超前MACD:=2*(MACD多头-超前DEA)+中轴;微_信:DRAWNULL,COLOR00FF00;FSC2012782002:DRAWNULL,COLORRED;MACD多空趋势:DRAWBAND(MACD多头,RGB(204,51,51),空头,RGB(0,130,244));MACD多头重画:DRAWBAND(MACD多头,RGB(153,153,51),MACD多头,RGB(153,153,51));MACD空头重画:DRAWBAND(空头,RGB(0,224,224),空头,RGB(0,224,224));MACD红柱1:STICKLINE(量能柱>=中轴,量能柱,中轴,1.5,0),COLOR2E0022{COLOR000077};MACD红柱2:STICKLINE(量能柱>=中轴,量能柱,中轴,1.1,0),COLOR372635{COLOR809A3C}{COLOR000088};MACD红柱3:STICKLINE(量能柱>=中轴,量能柱,中轴,0.6,0),COLORFF00FF{COLOR000099};MACD红柱4:STICKLINE(量能柱>=中轴,量能柱,中轴,0.15,0),COLORFF00FF{COLOR0000AA};MACD紫柱1:STICKLINE(量能柱<=中轴,量能柱,中轴,1.5,0),COLOR2E0022{COLOR808040}{COLORAA6633};MACD紫柱2:STICKLINE(量能柱<=中轴,量能柱,中轴,1.1,0),COLOR372635{COLOR809A3C}{COLORBB7744};MACD紫柱3:STICKLINE(量能柱<=中轴,量能柱,中轴,0.6,0),COLORGREEN{COLORCC8855};MACD紫柱4:STICKLINE(量能柱<=中轴,量能柱,中轴,0.15,0),COLORGREEN{COLORDD9966};上面这代码是通达信三合一MACD代码。希望博主将其转化为mt5指标格式