RedKTrader

RedK_xMACD: Extending the classic MACD with a simple filter

This is a simple concept that attempts to squeeze more price action insights from the classic MACD
we add a 3rd (longer length, slower) Moving Average line that acts as a trend filter - so whenever we are ("we" = the price and the 2 other MAs) are above that filter line, we consider ourselves to be in the up-trend territory, and vica versa .. so the MACD calculation here - that is represented by the main (reg/green) line in the plot - will represent the distance between the slow MA and the filter MA - when that MACD line crosses the zero axis up or down, that represents the trand reversing from one direction to the other.

A signal line (a smoothed version of that MACD line) is still added for 2 reasons
1 - the signal line makes it easy to see if an eminent trend reversal is to be expected
2 - to stay visually-consistent with the classic MACD :)

the distance (or delta) between the other 2 MAs continues to reflect an indication of the short-term momentum and is what the histogram represents.
we still have the benefit of the convergence/diversion between the price itself and the histogram similar to the classic MACD
this MACD version will also clearly show how price and momentum action will lead the trend -- i know that's a big discussion topic :)

i added a classic MACD at the bottom panel, and used the same length settings (fast / slow) for side-by-side comparison

i coded this when i found that i use 3 moving averages all the time during my chart analysis, and while i'm a big fan of the classic MACD, i wanted to find a simple way to get my MACD to reflect what the 3 MAs on the price chart show. turned out to be insightful - i hope other fellow traders may find this useful

the code is simple and i started it from the built-in MACD in TradingView. Other annotations are added to the chart here as i believe this will better explain how the eXtended MACD works
- there are 4 reversals that occur in that chart, and i chose to show one in step-by-step fashion.

if more explanation is needed to how this can be used, pls let me know in the comments.



開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?