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が提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?