TradingView Cycle Analysis & Indicator

Documentation on how to use cycle analysis techniques and cyclic indicators in TradingView

Public & Open Source Cycle Indicators

Free and open source versions of our cycle indicators for TradingView

Public & Open Source Cycle Indicators

Detrended Rhythm Oscillator (DRO)

The purpose of this indicator is to visualize and check if there is a common rhythm or beat in the dataset of interest.

dro_example.png

Chart: 120m Bitcoin chart visualizing the dominant rhyhtm of 40/80 bars with the DRO indicator
TradingView chart: https://www.tradingview.com/x/WYBQLz9D/

 
Overview and Background

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.

 
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.

This indicators adds the following improvements:

1) Using a DPO to detrend the price (can be turned on or off)
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 we 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 and 80. 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.

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 oscillators which require length settings as input pararmeters.

Public & Open Source Cycle Indicators

Cyclic Smoothed RSI Indicator

The cyclic smoothed RSI indicator is an enhancement of the classic Relative Strength Index (RSI). The cyclic smoothed RSI indicator was first introduced in the book "Decoding the Hidden Market Rhythm Part 1: Dynamic Cycles" (LINK) and the indicator code has been made public for different charting platforms.

It helps to avoid the noisy signal of the RSI with static oversold/oversold areas, usually leading to many false trade signals and thus to many whipsaw trades. The csRSI therefore provides a much cleaner, zero-lag signal line with adaptive bands to help identifying better trade signals.

Advanced Features

For more information, please read the referenced book Chapter 4 "Fine tuning technical indicators". (Amazon link)

Our TradingView indicator version is available as public Open-Source indicator in their public library. If you want to use this indicator on your chart, use the "Indicators" button from the TradingView chart panel.

image-1622987661205.png

Search for "RSI" in the "Indicators" window and select the "RSI cyclic smoothed v2" from WhenToTrade as indicator.

image-1622970876930.png

Source Code

You can also open the source code and adjust for your own needs. The script page with code is available via this link at TradingView: https://www.tradingview.com/script/TmqiR1jp-RSI-cyclic-smoothed-v2/

Dominant cycle based improved RSI Indicator with source code

This indicator is not designed for use as an automated trading strategy
This is an improved technical indicator using the dominant cycle to provide its advanced features. It can be used as drop-in replacement for the classic RSI. The basic applications of technical analysis for oscillators and the Relative Strength Index apply. The script is intended for use in discretionary trading.

 

Public & Open Source Cycle Indicators

Cycle Swing Indicator

The Cycle Swing Indicator indicator is an enhancement of the classic Momentum indicator. The cyclic-tuned momentum indicator was first introduced in the book "Decoding the Hidden Market Rhythm Part 1: Dynamic Cycles" (LINK) and the indicator code has been made public for different charting platforms. It does not require any input or parameter as this indicator automatically adjusts the calculation according to the main market cycle.

Key Features

When the lag is eliminated and the smoothed, clear reversal points are restored, new options for technical analysis arise. The Cycle-Swing Indicator is fast, clear and smooth. You get better timing, greater accuracy, and better signals.

Many systems include momentum as an indicator. Until now, however, momentum signals have been extremely jittery, resulting in whipsaw trades. In contrast, the adaptive cycle swing generates an ultra-smooth swing without adding lag to the original signal.

The Cycle Swing Indicator "CSI" provides an optimized "momentum" oscillator based on the current dominant cycle by considering the dominant cycle swing instead of the raw source momentum. Offering the following improvements:

The following common problems with standard indicators are solved by this indicator:

First, normal indicators introduce a lot of false signals due to their noisy signal line. Second, to compensate for the noise, one would normally try to add some smoothing. But this only results in adding more delay to the indicator, which makes it almost useless. Third, standard indicators require a length adjustment to derive reliable signals. However, you never know how to set the right length.

All three problems described above are solved by the developed adaptive cyclic algorithm.

Screenshot_csi.jpg

Add to chart

Our TradingView indicator version is available as public Open-Source indicator in their public library. If you want to use this indicator on your chart, use the "Indicators" button from the TradingView chart panel.

image-1622987661205.png

Search for "Cycle Swing" in the "Indicators" window and select the "Cycle Swing Momentum" from WhenToTrade as indicator.

image-1622989388693.png

Source Code

You can also open the source code and adjust for your own needs. The script page with code is available via this link at TradingView: https://www.tradingview.com/script/b7o7GmWT-Cycle-Swing-Momentum/

This indicator is not designed for use as an automated trading strategy
This is an parameter-less improved technical indicator. It can be used as drop-in replacement for the classic momentum. The basic applications of technical analysis for oscillators and the Momentum oscillator apply. The script is intended for use in discretionary trading.

Advanced & Invite-Only Cycle Indicators

Advanced cycle indicators and strategies for use with TradingView. Requires active subscription from whentotrade.com or WaveCycleTrader.

Advanced & Invite-Only Cycle Indicators

Cyclic Smoothed RSI with period highlighter

This is an advanced TradingView "Invite-Only" indicator which requires activation based on a valid subscription from whentotrade.com or WaveCycleTrader.

This indicator is not designed for use as an automated trading strategy
This is an improved technical indicator using the dominant cycle to provide its advanced features. The basic applications of technical analysis for using oscillators apply. The script is intended for use in discretionary trading.

The cyclic smoothed RSI MTF indicator is an enhancement of the Relative Strength Indicator "RSI", adding

This indicator is an advanced version of the public available open-source cyclic smoothed RSI indicator. It provides fully automatic time frame highlighting by using a cyclically smoothed RSI from a higher time frame to indicate time frames with high probability signals. These high probability windows are highlighted when the indicator from the higher time frame is in dynamic overbought or oversold territory.

Overview and Examples

The following chart illustrates how it works and compares it against the basic RSI indicator. The csRSI indicator shows automatic highlighted periods with highlighted red and green time zones. These areas are based on another cyclic smoothed RSI indicator from a higher time-frame. The periods are marked red when the higher time-frame csRSI is above the upper bands and marked green when below the lower dynamic bands.

These colored periods in the indicator panel indicate the time to look for signals from the csRSI indicator. The derived signals are marked on the price chart. While the standard RSI would give too much whipsaw trades as indicated by the questions marks, however. the csRSI MTF version is able to filter the high probability signals while skipping false signals with a clear, objective procedure.

S&P500 EMini Futures

csRSI 2H chart / 1D filter example signals

Cyclic Smoothed RSI Indicator with Mulit-Timeframe filtering

Chart 1: S&P E-Mini Futures 2h chart with daily higher time-frame filtering period for the csRSI, showing the standard RSI in the lower panel for signal comparison, signals from the csRSI are marked on the price chart
Chart Link: https://www.tradingview.com/x/5HBRAtUa/

 

Bitcoin BTC/USD

csRSI 2H chart / 1D filter example signals

csRSI Bitcoin BTC/USD signals

Chart 2: Bitcoin BTC/USD 2h chart with daily higher time-frame filtering period for the csRSI, signals marked
Chart Link: https://www.tradingview.com/x/h407gPQm/

EUR/USD Forex

csRSI 20min chart / 2h filter example signals

csRSI_EURUSD_20M_2H_v.png

Chart 3: Bitcoin BTC/USD 20min chart with 2H higher time-frame filtering period for the csRSI, signals marked
Chart Link: https://www.tradingview.com/x/zx66TIpJ/

Info:
All three examples are setup with the basic standard settings and no additional parameter adjustments. The placed arrows on the price/indicator panel and the projection price areas have been added manually to visualize the signals for an discretionary trading  approach. They are derived based on standard technical indicator oscillator readings (signal turn above/below bands). Due to the nature of the indicator (ultra-smooth, sharp curves, dynamic bands), these signals are easy to spot, and will help to avoid whipsaw trades in volatile conditions.

 

Features

The following chart is a close-up of the EUR/USD example above and shows the forex pair on a 20-minute time frame for the continuous period May 23, 2021 to May 27, 2021. The normal RSI is also plotted for comparison. Since the normal RSI would give too many unclear signals marked with "?", the csRSI first filters the high probability time frames according to the integrated multi time frame filter from the 2h chart. In addition, the smooth indicator line allows very precise detection of turns and divergences using the adaptive bands. In the 4-day period shown, there were 2 clear buy and sell signals. The normal RSI would not have been able to filter the wrong signals from the right ones.

csRSI_EURUSD_20M_2H_ZoomFeatures.png

Chart: EUR/USD 20 min chart with csRSI signals and key features
Link: https://www.tradingview.com/x/ekN6ULpq/

Multi-Time-Frame filtering

The indicator provides cycles-within-cycles filtering by integrating a higher level time-frame cyclic smoothed RSI indicator. This embedded higher time-frame allows to highlight periods in time where the cyclic RSI indicator reached extreme conditions on the higher resolution. Allowing us to provide multi-time-frame analysis bundled in one single indicator. The included MTF feature allows to individually select the required higher time frame for each indicator panel. The conditions are plotted on the indicator panel using colored backgrounds and can also be used the generate automatic alerts. It allows to indicate areas which much higher signal accuracy than using a single indicator plot alone.

Ultra-smooth indicator

Standard technical indicators introduce a lot of false signals due to their noisy signal line. To compensate for the noise, one would normally try to add smoothing. But this only results in adding more delay to the standard indicator, which makes it almost useless. Finally, standard indicators require a length adjustment to derive more reliable signals. However, one never knows how to set the right length for a standard indicator. All these three problems described are solved by our used ultra-smooth algorithm. Providing an ultra-smooth indicator curve which allows to derive more valid signals than on noisy signal lines. And reducing the risk of having too much whipsaw trades based on "false" signals from flattering standard indicator plots. While almost adding no lag, the smoothness of our csRSI does not introduce signal delays.

Dynamic adaptive bands

Technical oscillators provide static threshold offset to indicate oversold and overbought areas. Traditional interpretation and usage of the RSI dictates that values of 70 or above suggest that a security is becoming overbought and may be primed for a trend reversal. While values of 30 should suggest the symbol is becoming oversold and is primed for the next upswing. However, these static values do not take into account trending or cyclic market conditions. In up-trending markets, the value might be above the static value of 70 for a long time and there will be several indicator reversals above that threshold without any real trend reversal. To account for trending or cyclic market conditions, we are using and adaptive, dynamic version to calculate the upper and lower bands. E.g. the indicators aligns the bands based on up trends while increasing the upper level and does the same in down trending markets. Allowing to spot turns above or below the bands while using dynamic market conditions to adapt the overbought and oversold areas.

Cycle-tuned sharp signals

Another important aspect is having clear and sharp turns on the signal line. Otherwise you will never know in real-time if a turn on the indicator might correlate to a turn in the price. A risk by adding smoothness is to loose the required sharpness. Our version maintains the sharpness of signal turns while in parallel adding the zero-lag smoothness. In addition to this zero-lag algorithm, you can adjust the length according to the dominant cycle in the underlying security or asset. When tuning the indicator length parameter according to the dominant cycle length, the signal turns are becoming even more accurate and sharp as the indicator takes real the length of the main market vibration into account. Which highlights turns on the real market cycle while filtering out noise. Standard indicators are most used without the knowledge of the "correct" length settings. Our additional cycle tools can guide the analyst in detecting the dominant cycle length.


Settings & Parameter

The Inputs section allows you to select the time frame for the indicator signals. We recommend keeping the indicator time-frame according to your chart time frame ("Same as chart"). The cycle length allows to improve the signals by entering the dominant cycle length of the analyzed dateset. This parameter is optional if the current dominant cycle is not known. In that case, leave it at 20. The dominant cycle length can even improve the indicator signal generation. The examples above have not been optimized by using the dominant cycle length and just used the standard setting of 20.

The MTF CYCLE FILTER area is used to set the time-frame used as filter to plot the colored indicator background in red and green areas when the higher time-frame indicator is above (red) or below (green) the dynamic bands. These indicate the period of time with high probability to look for signals on the main indicator line.

csRSI_Parameter_Settings_N.jpg csRSI_Parameter_Settings2.jpg

Chart: csRSI MTF Indicator Settings Panel

The MTF Resolution parameter input is important for generating the highlighted red/green areas on the indicator panel. You must enter a higher time-frame than your indicator time-frame in order to get the reliable highlighting. We recommend the following combinations of trading time-frame and filter time-frame resolutions:

Trading time-frame
(chart)
MTF indicator resolution for area highlighting
20 min 2 h
2 h 1 day
1 day 1 week

Table: Possible combinations for chart/indicator and MTF filter resolution

You can enter the current dominant cycle length on the chosen higher time-frame resolution to even further optimize the indicator accuracy in the field "MTF CYCLE FILTER - Cycle Length".

The Style sections allows to active/de-active individual plots. The standard setting disables the higher time-frame csRSI indicator which is only used to indicate the colored areas. If required, you can also enable the MTF indicator and adaptive bands to be plotted in the same indicator panel. The values shown in the style section also indicate which values are available for individual alert generation.

 

Automatic Signals & Alerts

It is possible to create your own automatic signals with the csRSI MTF indicator using the TradingView alarm function. Click on the three dots "More" beside the indicator name label and select "Add Alert on csRSI ..." from the context menu.

Add cyclic smoothed RSI indicator alert

Chart: Configure csRSI alert to get notified once a symbol gets into the time zones of interest (red/green)

For example, if you want to receive an alert when the high probability periods (red/green highlighted areas) have been reached for a monitored symbol without manually watching the indicator panel, you can set up a custom alert. The csRSI indicator provides the raw values necessary to set up your alarm conditions. Set the "CSRSI MTF" as the value for the "Out of Channel" condition and select the "HigBand MTF" and "LowBand MTF" indicator values as the upper and lower limit parameters in the alarm's dialog box. Once you have set up this alarm, you will not need to monitor your charts manually. The TradingView alarm will inform you as soon as an important time zone is reached. These are the situations when you would open the chart and watch for trigger signals on the indicator line. If you set up this alert as an email, you can even focus on other things and let the csRSI MTF highlighter condition alert you when you should pay attention to the trading chart.

csRSI_Alerts.jpg

Chart: Example csRSI alert setup

 

Usage & Trade Signals

Classic rules apply as with every technical oscillator. In addition use this indicator to identify the following conditions:

Cycles App Integration

Providing information on how to link the cycles application with live data updates and transfer composite cycle models back to the TradingView chart

Cycles App Integration

Link TradingView charts with Cycles app via webhooks alerts

The integration provides a back-to-back integration between your TradingView charts and the cycle analysis toolset. Allowing to keep your TradingView chart data synced in real-time with the cycle analysis API and cycle application. Allowing to monitor active cycles in your TradingView chart for any symbol and time-frame.

The first step is to setup a separate alert-condition via a new pine script and attach it to your chart you want to use for cycle analysis.

1. Create alert-condition

Create a new individual alert-condition via a custom pine script. The simplest way of alert-condition for a pine script looks like this:

//@version=4
study("WTT_DataFeed")
plot(close)
alert = true

msg = "{\"streamid\":\"YOUR-STREAM-ID\", \"messagetype\":\"UPSERT\", \"dates\": [ \"{{time}}\" ], \"values\": [ {{close}} ] }"

alertcondition(alert, title='data', message=msg)

Be aware that the text string YOUR-STREAM-ID within the msg variable will be replaced later when you setup the alert. This is just a new alert-condition we place on your chart. This is not the alert. The message object (msg) is already prepared to work with the cycle analysis endpoint. So don't change this message if you want it to work with our cycle analysis.

2. Open symbol/chart

Open your symbol on a TradingView chart. Select the required time-frame and place the new script on the chart. You can use the pre-build script down below and can link it to your favorite indicators.

Want to place this script on your TradingView chart? Just use this prepared script:
https://www.tradingview.com/script/FTEsZurP-Cycle-Analysis-WebHook-API-Integration/

3. Get Cycle Analysis API Key

Before we start the alert and connection, ensure you have your cycle analysis API key at hand. You will find your API key via the cycle application: https://cycle.tools/account/api

Note down that key as you need to enter it when you setup the webhook connection in the next step.

4. Activate the webhook

The "Create Alert" function from TradingView panel will activate the webhook on their servers for your symbol and time-frame:

Create Alert to connect via webhook with cycle analysis

To start the live sync, the web-hook will be activated via the alert activation from the TradingView alert panel. Ensure to select the following options as shown:

TradingView Create Alert

Before you create the alert, replace the YOUR-STREAM-ID tag in the Message section with the stream ID you want to see that in your cycle analysis platform. Also replace YOUR-KEY in the webhook URL with your cycle analysis API key.

5. First webhook activation

After activation, you will see a confirmation in the alert panel that this webhook has now been created. Before we move on to the cycle analysis, we should wait and ensure that the first webhook has successfully been fired. We can see this in the alert panel when a date/time information has been placed in this section below your alert:

TradingView Alert webhook triggered

6. Open Cycle Analysis Streams

Now, you have done everything required on TradingView. The webhook will continuously fire off, even when you close and change your chart configuration. We can now monitor this symbol in our cycle analysis environment to see the cycle detection for that symbol. Open the cycle analysis streams page to see your new symbol added.

Go to the following page to see the connection: https://cycle.tools/settings/streams

In this case, we named the symbol "TV-BTCUSD-5M" - and you will find it with this ID in your cycle analysis streams board:

image-1616921324162.png

After you have setup the connection, there is not enough history available to start the cycle analysis. Therefore you either need to wait until at least 100 datapoints have been fired from the webhook connection or you can backfill the series manually via the "Fill" button and upload CSV data.

 

Cycles App Integration

Composite Cycle Vector Plot

This script allows to transfer the cycle analysis results from the Cycle Model Builder into an indicator plot on the TradingView chart:

image-1624463676762.png

The TradingView script to plot the vector as indicator on the chart is available for public usage here:
https://www.tradingview.com/script/OqeEKITd-WTT-Composite-Cycle-Plotter/

You can add this script to your favorite indicators to apply it to your charts:

image-1624694480305.png

If you are looking for the MotiveWave version of this Composite Cycle Vector plot, please download the MotiveWave integration pagage here.


 
How to transfer your composite plot to TradingView chart:

1. Create your composite plot in the cycle app and click the highlighted icon in the Composite Cycle Model Builder window:

image-1624693982018.png

 

2. A window will open to inform you to copy the vector to your clipboard:

image-1624694060687.png

 

3. You can mark the TradingView indicator as "favorite" so it will appear in your list of favorite indicators:

image-1624694271689.png

 

4. Once applied to the chart paste the string into the "Composite Vector" field.

Ensure to remove all existing content in the field before you paste your new data.

image-1624694342596.png