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 ✌💗📈
Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?