Skip to main content

Smoothed MACD for Amibroker (AFL)

HelpingEachOther about 8 years ago Amibroker (AFL)

  • Rating:
    5 / 5 (Votes 2)
  • Tags:
    amibroker, oscillator, macd

This version of the moving average convergence divergence (MACD) indicator uses the using gaussian moving average (Ehler) in its calculation. The advantages are that it is smoother than the original and uses half the number of bars of data.

TO USE THIS INDICATOR
You will need to download Indicators.dll plugin from http://www.amibroker.org/3rdparty/ and paste it in the plugin folder of your Amibroker installation.

Screenshots

Indicator / Formula

Copy & Paste Friendly
r1=12/2;
r2=26/2;
r3=9/2;
ml=scGauss2ord(C,r1)-scGauss2ord(C,r2);
sl=scGauss2ord(ml,r3);
hist=ml-sl;
Plot(ml,"ml",colorRed);
Plot(sl,"sl",colorBlue);
Plot(hist,"hist",IIf(hist>Ref(hist,-1),colorCustom11,IIf(hist<Ref(hist,-1),colorCustom12,0)),stylehistogram);

4 comments

about 8 years ago

I want to have a code for buy condition like this
Buy = EMA (Close, 50) > EMA (Close,100) AND Closing price is 2% greater than EMA 50
Can anyone help ?

about 8 years ago

Your question doesn’t seem to relate this indicator. You should either email Amibroker support or post your question on their forums.

4. mavirk
about 8 years ago

Buy = EMA(C,50) > EMA(C, 100) AND C > ((EMA(C,50) *.02) + EMA (C,50));

Leave Comment

Please login here to leave a comment.