OPEN-SOURCE SCRIPT

Alpha-Configurable EMA MACD

I read that the original MACD calculation used EMA alphas of 0.15 and 0.075, and that the 12 and 26 period EMA settings only approximate that. So using this excellent library: https://www.tradingview.com/script/sSlwVjuI-ka66-lib-MovingAverages/, I made a version of MACD that uses the original alpha-based EMA instead of period-based EMA. Color palette taken from the default Tradingview MACD. The result is qualitatively pretty much the same, although quantitatively its very slightly different. Publishing mostly to share my curiosity satisfied. You won't really gain any appreciable advantage from using this over the default version, but it was nice to see that.
alphaExponential Moving Average (EMA)Moving Average Convergence / Divergence (MACD)

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer