ka66

ka66: Enhanced MACD

ka66 Updated   
This is a more configurable MACD:

  • Allows various moving averages (EMA, SMA, Hull, WMA) instead of just EMA.
  • Better color coding for MACD line, rising vs. falling
  • Optional Normalised Scale; my pet peeve with standard MACD, that we can't really easily compare it across instruments. Taking a page from the ATR Percent indicator, we allow for normalising the MACD and Signal lines relative to Close: MACD / Close x 100. Ditto for the Signal line. This is really useful for reversal type scenarios, and to avoid ranging markets.
  • Threshold horizontal line markers to further support the use of the Normalised Scale. Simply configure this via the Style Settings.
Release Notes:
Now allow differing moving average types for each component of the MACD: Fast, Slow, Signal. The use case is where we want to gauge the momentum by different moving averages, e.g. a faster one using EMA, and a slower one using a plain SMA.

The chart shows 22-EMA vs. 110 SMA, for example, and its corresponding MACD, with a 16-period SMA signal line.

Visual enhancement: Use gradation of colours in the MACD histogram, for better visual cues on changes, this cue is there in the stock TV MACD, it feels like I can't call this "enhanced" if I take away a useful feature, hey!
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 a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?