Ankit_1618

Dominant Cycle Adaptive MACD

This Indicator is based on classic MACD but with an exceptional smoothing.
This smoothing eliminates the noise of the classic MACD as you see in the Chart

Adaptive MACD is compiled using with two adaptive moving averages, one adaptive to the dominant cycle and the other adaptive to twice the dominant cycle. As the basic behind the MACD is the difference of two moving averages we cannot find much difference between the conventional MACD (12, 26) and the adaptive MACD . However the adaptive MACD is less prone for less whipsaws and it catches the trends very well at the same time the catches the turning points in time. The Adaptive MACD is definite one notch better than the conventional MACD .


Dominant Cycle Period is calculated using Ehler's Method {Mentioned in the code}
This is how the Adaptiveness Impacts the Price Chart

1. (12, 26 EMA ) VS Adaptive Dominant Cycle EMA

2. See how the Adaptive Lengths {both FastLength and SlowLength changes with time!}

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

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

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
Masters in Quantitative Finance,
University of London .

Algorithmic Trading Certifications
University of Oxford, Säid Business School .

Electronics and Communications Engineer at core .

Message to Learn more!

ความคิดเห็น

Looks great. I've been having issues using the dominant cycle as the length for indicators and it looks like you created a custom EMA for similar reasons. Is there no simple way to make it work with the built in functions?
@PineCoders
+2 ตอบกลับ
PineCoders AtomOfScent
@AtomOfScent, There is no dynamic length version of `ema()` available in Pine. Ones do exist for other types of MAs and functions:
https://www.tradingview.com/pine-script-docs/en/v4/Release_notes.html#september-2020
https://www.tradingview.com/pine-script-docs/en/v4/Release_notes.html#january-2021
+1 ตอบกลับ
AtomOfScent PineCoders
@PineCoders, thanks for the info. I was hoping to understand why dynamic lengths aren't working and how functions can be modified as the author did above to make them work (it can lead to a lot of frustration). A future tutorial on that as well as expanding the range of built-in functions supporting dynamic lengths would be appreciated in the future. :)
ตอบกลับ
This is absolutely brilliant! Thanks for making this. Looking at the cycles in the market really gives us some outside information besides just the price action right in front of this so I'm really a big fan of creative ways to incorporate cycles into indicators. Is there any way you can create other indicators that use dominant cycle like creating a new SSL or Slope Vortex?
+1 ตอบกลับ