TradingView
Ankit_1618
2021年2月21日上午9點40分

Dominant Cycle Adaptive MACD 

E-mini Nasdaq-100 FuturesCME

描述

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!
評論
AtomOfScent
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
PineCoders
@AtomOfScent, There is no dynamic length version of `ema()` available in Pine. Ones do exist for other types of MAs and functions:
tradingview.com/pine-script-docs/en/v4/Release_notes.html
tradingview.com/pine-script-docs/en/v4/Release_notes.html
AtomOfScent
@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. :)
stevenwalter0
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?
更多