Spinn29

Ehlers Decycler

Spinn29 Güncellendi   
John F. Ehlers introuced Decycler in his book "Cycle Analytics for Traders", chapter 4.

The decycler is designed to remove the influence of shorter cycle fluctuations, resulting in an output that closely resembles a one-pole low-pass filter.

A standout feature of the decycler is its notably minimal lag. The most extended cycle elements experience a delay of less than five bars. When considering a frequency of 0.05 cycles per bar (equivalent to a 20-bar cycle period), the lag approximates 1.5 bars. Components with a higher frequency face even lesser delays. Consequently, any higher-frequency variations that pass the filter's attenuation align closely with the price fluctuations. This makes the decycler an optimal "immediate trend detector," giving a true depiction of the data's trend.

While the SuperSmoother filter can yield a comparably smoothed output, the decycler typically exhibits less lag when the two are juxtaposed. It's worth noting that the decycler operates as a one-pole filter, implying it doesn't have the best filtering capabilities. It's not advisable to use the decycler as a smoothing filter to eliminate aliasing disturbances. Instead, its application should focus on generating an immediate trend representation, especially when choosing a larger cutoff period. The broad cutoff period equips the decycler with the ability to reduce aliasing disturbances, given that it's significantly distant from the Nyquist frequency.

There are already several decycler indicators on Tradingview, but I like to structure the code and highlight the main components as functions rather than hiding them in the code. I hope this is useful for those who are starting to learn Pine Script.
Sürüm Notları:
Added the ability to set line thickness and receive alerts.
Also minor changes to the code.
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?