OPEN-SOURCE SCRIPT

ka66: Enhanced MACD

Cập nhật
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.

Phát hành các Ghi chú
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!
Phát hành các Ghi chú
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

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Thông báo miễn trừ trách nhiệm