Dope DPO

Sherlock_MacGyver Updated   
The "Dope DPO" (DDPO) indicator is a technical analysis tool designed for traders to identify trends and potential trend changes in the market. It's based on the concept of the Detrended Price Oscillator (DPO), but with several enhancements for greater versatility and user customization.

Key Features of the Dope DPO Indicator:

Averaging Multiple Periods: The indicator averages the DPO calculations over ten different time periods. This averaging helps in smoothing out the volatility and providing a more comprehensive view of the market trend.

Customizable Smoothing: Users can choose the length of the smoothing as well as the type of moving average (SMA, EMA, WMA, or RMA) for smoothing. This allows for flexibility in how the indicator responds to price changes.

Trend Change Detection: The indicator includes a feature to detect changes in the market trend. It does this by comparing the current value of the smoothed DPO to its value a specified number of bars back. This helps in identifying potential reversals or shifts in momentum.

Dynamic Color Coding: The indicator uses color coding (green and red) to visually represent the trend direction. If the smoothed DPO is trending upwards compared to a previous value, the color will be green, indicating bullish momentum. Conversely, a red color signifies bearish momentum.

Horizontal Reference Lines: It includes horizontal lines at specific levels (overbought, zero, and oversold) to provide reference points for interpreting the indicator's values.


Traders can use the Dope DPO to gauge the overall market trend and to look for potential entry and exit points based on trend changes.

The color-coded histogram makes it easy to spot when the trend might be reversing, which can be particularly useful in conjunction with other technical analysis tools.

The flexibility in choosing the smoothing method and length allows traders to tailor the indicator to different trading styles and timeframes.

Release Notes:
- Requested update:
- Added divergence lines
- Unrequested changes:
- Change to default settings
- Removed 0 line for better clarity
- Added toggle for smoothing
Release Notes:
- Added a shorter version along with the existing (now the longer) version of a DPO averaged ribbon.
- Both share the smoothing toggle and smoothing factor
- Each has independent length adjustments
- The line is the longer one, the histogram (columns technically) is the shorter one
- Short version starts at 5 and moves up 10 increments of 5 (then averaged and smoothed)
- Long version starts at 10 and moves up 10 increments of 10

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?