WhenToTrade

Detrended Rhythm Oscillator (DRO)

How to detect the current "market beat" or market cycle?

A common way to capture the current dominant cycle length is to detrend the price and look for common rhythms in the detrended series. A common approach is to use a Detrended Price Oscillator ( DPO ). This is done in order to identify and isolate short-term cycles.

A basic DPO description can be found here:
https://www.tradingview.com/support/solutions/43000502246-detrended-price-oscillator-dpo/

Improvements to the standard DPO
The main purpose of the standard DPO is to analyze historical data in order to observe cycle's in a market's movement. DPO can give the technical analyst a better sense of a cycle's typical high/low range as well as its duration. However, you need to manually try to "see" tops and bottoms on the detrended price and measure manually the distance from low-low or high-high in order to derive a possible cycle length.

Therefore, I added the following improvements:

1) Using a DPO to detrend the price
2) Indicate the turns of the detrended price with a ZigZag lines to better see the tops/bottoms
3) Detrend the ZigZag to remove price amplitude between turns to even better see the cyclic turns ("rhythm")
4) Measure the distance from last detrended zigzag pivot (high-high / low-low) and plot the distance in bars above/below the turn

Now, you can clearly see the rhythm of the dataset indicated by the Detrended Rhythm Oscillator including the exact length between the turns. This makes the procedure to "spot" turns and "measure" distance more simple for the trader.

How to use this information
The purpose is to check if there is a common rhythm or beat in the underlying dataset. To check that, look for recurring pattern in the numbers. E.g. if you often see the same measured distance, you can conclude that there is a major dominant cycle in this market. Also watch for harmonic relations between the numbers. So in the example above you see the highlighted cluster of detected length of around 40 ,80 and 120. There three numbers all have a harmonic relation to 40 .

Once you have this cyclic information, you can use this number to optimize or tune technical indicators based on the current dominant cycle length. E.g. set the length parameter of a technical indicator to the detected harmonic length with the DRO indicator.

Example Use-Case
You can use this information to set the input for the following free public open-source script:

Disclaimer
This is not meant to be a technical indicator on its own and the derived cyclic length should not be used to forecast the next turn per se. The indicator should give you an indication of the current market beat or dominant beats which can be use to further optimize other oscillator or trading related settings.

Options & settings
The indicator allows to plot different versions. It allows to plot the original DPO , the DRO with ZigZag lines, the DRO with detrended ZigZag lines and length labels on/off. You can turn on or off these version in the indicator settings. So you can tweak it visually to your own needs.

Notas de Lançamento: : a glitch which might cause incorrect distance label length
: added a function to turn the detrending DPO on/off, e.g. to use as "indicator on indicator" with different detrending
Notas de Lançamento: Changes in this version:
  • solved wrong distance labels
  • added the new option to turn on/off detrending pre-processing
Script de código aberto

No verdadeiro espírito TradingView, o autor deste script o publicou com código aberto, para que os traders possam compreendê-lo e verificá-lo. Um brinde ao autor! Você pode usá-lo gratuitamente, mas a reutilização deste código em uma publicação é regida pelas Regras da Casa. Você pode favoritá-lo para utilizá-lo em um gráfico.

Quer usar esse script no gráfico?
Lars von Thienen

Cycle Analysis Tools
https://www.whentotrade.com

TradingView Cycle Knowledge Docs
https://docs.cycle.tools/books/tradingview-cycle-analysis-indicator

Comentários

500 moedas
+1 Resposta
WhenToTrade PineCoders
@PineCoders, Thank you!
+1 Resposta
AaronHynninen PineCoders
@PineCoders, Absolutely deserved, thank you.
Resposta
Great work Lars! You should get script of the month for this one, if Pinecoders is paying attention.
500 moedas
+1 Resposta
WhenToTrade pleasantCardin94082
@pleasantCardin94082, Thank you! You know, I always strive to help and educate on how to use cycles.
+1 Resposta
AaronHynninen pleasantCardin94082
@pleasantCardin94082, Agree 100% - Good to see these rewards for the author!
Resposta
This publication is now featured in our Editors' Picks: https://www.tradingview.com/scripts/editors-picks/ .
In the name of all TradingViewers, thank you for your valuable contribution to the community, and congrats!
+2 Resposta
AaronHynninen PineCoders
@PineCoders, Absolutely, well said.
Resposta
Here is a short video tutorial on how it works and how to use it:
+1 Resposta
ChasinAlts WhenToTrade
@WhenToTrade, My friend, I recall when you first posted you Cyclic RSI and I was so interested and really tried to wrap my mind around it even by going to your site and watching many of your videos. This TRULY should be script of the month. For me, this is monumental in my understanding of your process that you teach on your site. This is totally MY JAM. Hope the best for you. SOOO excited to revisit everything I put on the backburner due to not being able to detect the dom cycle. Thanks a ton man!!!
+1 Resposta
Início Rastreador de Fundamentos Rastreador Forex Rastreador de Criptomoedas Calendário Econômico Sobre Recursos gráficos Preços Indique um Amigo Regras da Casa Central de Ajuda Soluções para Sites & Corretoras Widgets Soluções em Gráficos Biblioteca de Gráficos Lightweight Blog & Notícias Twitter