BarefootJoey

Dominant Cycle Detection Oscillator

This is a Dominant Cycle Detection Oscillator that searches multiple ranges of wavelengths within a spectrum. Choose one of 4 different dominant cycle detection methods (MESA MAMA cycle, Pearson Autocorrelation, Discreet Fourier Transform, and Phase Accumulation) to determine the most dominant cycles and see the historical results. Straight lines can indicate a steady dominant cycle; while Wavy lines might indicate a varying dominant cycle length. The steadier the cycle, the easier it may be to predict future events in that cycle (keep the log scale in mind when considering steadiness). The presence of evenly divisible (or harmonic) cycle lengths may also indicate stronger cycles; for example, 19, 38, and 76 dominant lengths for the 2x, 4x, and 8x cycles. Practically, a trader can use these cycle outputs as the default settings for other Hurst/cycle indicators. For example, if you see dominant cycle oscillator outputs of 38 & 76 for the 4x and 8x cycle respectively, you might want to test/use defaults of 38 & 76 for the 4x & 8x lengths in the bandpass, diamond/semi-circle notation, moving average & envelope, and FLD instead of the defaults 40 & 80 for a more fine-tuned analysis.

Muting the oscillator's historical lines and overlaying the indicator on the chart can visually cue a trader to the cycle lengths without taking up extra panes. The DFT Cycle lengths with muted historical lines have been overlayed on the chart in the photo.

The y-axis scale for this indicator's pane (just the oscillator pane, not the chart) most likely needs to be changed to logarithmic to look normal, but it depends on the search ranges in your settings. There are instructions in the settings. In the photo, the MESA MAMA scale is set to regular (not logarithmic) which demonstrates how difficult it can be to read if not changed.

In the Spectral Analysis chapter of Hurst's book Profit Magic, he recommended doing a Fourier analysis across a spectrum of frequencies. Hurst acknowledged there were many ways to do this analysis but recommended the method described by Lanczos. Currently in this indicator, the closest thing to the method described by Lanczos is the DFT Discreet Fourier Transform method.

Shoutout to @lastguru for the dominant cycle library referenced in this code. He mentioned that he may add more methods in the future.

Made w/ ❤ by @BarefootJoey ✌💗📈
開源腳本

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

免責聲明

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

想在圖表上使用此腳本?