OPEN-SOURCE SCRIPT

ka66: Enhanced MACD

ที่อัปเดต:
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.

เอกสารเผยแพร่
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!
เอกสารเผยแพร่
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

สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?

คำจำกัดสิทธิ์ความรับผิดชอบ