OPEN-SOURCE SCRIPT

ka66: Enhanced MACD

Actualizado
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.

Notas de prensa
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!
Notas de prensa
New Feature(s):

Allow standard deviation bands around the Signal line. Provided in the example chart is one possible use case of these bands, as an earlier detection of reversals (which, let's face it, default MACD is terrible at, and I really like MACD!). When the MACD line is extended from the Signal line, as it enters back into the extended bands, we may see a drop/reversal. Without having to wait for a very laggy crossover!

I have experimented with Keltner Bands in many different contexts, and my initial thought was of using ATR around the Signal Bands, but, for one, ATR requires OHLC data, where as I'm pretty much just comparing the band with its historical self, so while I am not the biggest fan of the over-responsiveness of standard deviation bands (though, I'm getting a better feel for them), in this case it works out.

I also allow differing colors for the Signal line, rising vs. falling vs. neutral (no change). In a trend following context, the Signal line often gives us a stable view of the trend. And fluctuations in the MACD provide pullback points, so having a clear color-coding of the Signal line can be helpful for visual scans of charts.

Removed Feature(s):

There was an option to show the Rate of Change of the MACD line (instead of the MACD itself). I haven't, thus far, found value in it. Though I had an idea that sudden flicks in the ROC could act as early warnings. But I hope the same intent is now covered via the use of bands around the Signal line and touches of those bands by the MACD line.

Happy and Profitable Trading, everyone.

CyclesMoving AveragesTrend Analysis

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?

Exención de responsabilidad