Weekly E-mails:  Crypto Trading Strategy 5 Weeks of Onboarding Reads. Latest Airdrops (Thu 7 AM EST). Or all of it.

Dismiss   Pick Your Preference
This site uses cookies (More).

 

Script Spotlight: Detrended Price Oscillator (DPO) - #CryptoTrading

The Detrended Price Oscillator strategy tool from TradingView is similar to a moving average, but easier to read.
Blog
  .  Published  · By KarlVonBahnhof

The feature of today’s Script Spotlight is an older tool that is not groundbreaking or super sophisticated but it will make your chart reading faster.

It is called The Detrended Price Oscillator and it is very similar to a simple moving average.

If you don’t have a TradingView account yet, make one here for free.

If you care for high leveraged trading, you’re probably looking for BitMEX as well, keep your cool though.

Detrended Price Oscillator Strategy by HPotter

Full script

//  Copyright by HPotter v1.0 30/03/2017
study(title="Detrended Price Oscillator", shorttitle="DPO")
Length = input(14, minval=1)
Series = input(title="Price", type=string, defval="close")
hline(0, color=green, linestyle=line)
xPrice = close
xsma = sma(xPrice, Length)
nRes = xPrice - xsma
pos = iff(nRes > 0, 1,
	     iff(nRes < 0, -1, nz(pos[1], 0)))
barcolor(pos == -1 ? red: pos == 1 ? green : blue )
plot(nRes, color=red, title="Detrended Price Oscillator")

Parameters: Length (number of timespans to calculate over, default 14) and Price (candle value input, default Close).

What it does: It takes the price values over the chosen span and calculates a standard moving average from them. It then calculates the difference between the price and the SMA: nRes = xPrice - xsma

The resulting line gets plotted below the chart and the chart’s candles are colored red or green depending on whether the value of the difference is positive or negative.

This is what the Detrended Price Oscillator, or DPO, looks like on a 1D BTCUSD chart. (I changed the default colors for clarity)

barcolor(pos == -1 ? orange: pos == 1 ? lime : aqua )

Does it work?

Of course it does work, there’s no rocket science in this one. You can use it on any timeframe and play with the length of the span.

On the 1W DPO gives an easy single-glance information about the market:

Even better, it is worth noting that the information you get from the color changes is equivalent to the cross of the Bollinger Band middle line on Bollinger Bands of the same length.

Here on a 1W chart for the lengths of 28:

For very long-term crypto charts this is actually more convenient that the bbands, if you are only looking for the position of the price relative to the mean.

You’ll notice I had to switch off the auto sizing on the chart because due to the periods of cryptocurrency bubbles, the lower and upper Bollinger bands shoot too far.

It won’t be a very difficult job to add candle coloring for the lower and upper Bollinger band crosses either, by the way.

Bottom Line

The Detrended Price Oscillator is indeed similar to SMAs. The information is presented by coloring the chart candles though, which means you don’t have to squint your eyes at the chart when investigating trend cycles.

A marginal advantage but if you have a chart with no candle-coloring script in place, this would be a good choice.


This review uses a strategy published to the TradingView community.

About the author

Written by KarlVonBahnhof

KarlVonBahnhof also on Reddit, Chris belongs to the crypto trader class of 2013. Located in the Americas most of the time, you're most likely to meet at r/BitcoinMarkets though.

 

Last added to Crypto Airdrops, Bounties & Opportunities
Name Date How to access Official URL Additional Info
Cloudbet Turbo Thursday Reload Bonus Every Thursday between 05:00-23:59 UTC Make a deposit of 0.1 mBTC or more today, Cloudbet gives you a 100% Reload Bonus of up to 50 mBTC/1 BCH. Remember you must activate the bonus in your player dashboard before making a deposit for the bonus to be credited! The bonus is only available for the Casino, not the Sportsbook. details make acct
POOL-X exchange listing promo Daily until listing POL has a random twitter draw of users who post a POOL-X graphic design every day until their token listing on the KuCoin exchange. You need to sign up via Google form and have a KuCoin account. form make acct
Verasity New Triviata Competition November 5 at 00:00 UTC - November 20th 00:00 UTC Verasity is a token-based platform for the attention economy. They always engaged a lot with the community and organized several airdrop and competition campaigns so far. The current two-week campaign relates to the Triviata app (iOS/Android). Sign up and enable your game participation in the app profile, and you get the chance of winning prizes with 4000 USD in total. Even if you don't win though, participating will earn you tokens that can be staked in the official wallet for over 30% yearly earnings. join about
Bethereum Price Pool on VK November 2019 There are regular competitions with the total pool of prizes worth 40K Bether if you join the gaming platform's VK channel. details make acct
Brave New Coin Challenge Until the end of the year The crypto market data provider is giving away small amount of their tokens if you add people to their telegram group. register telegram
FanEspo Big Competition (ERC20) All the time Fanespo is launching a new promotion contest worth $500 in FAN tokens. Details will pop up on you when you sign up on site. Overall, the eSports platform FanEspo is giving away the total of $1.6 million of tokens in contests. You need to have a FanEspo account. details make acct
Atomars Opportunity Launch promo There is a new altcoin axchange launched that now offers zero-fee trading, and possibly thinner markets for the market makers around. details make acct
Keybase Stellar Lumens Drop 11 September 2019 & Onwards The Keybase team announced a surprise airdrop worth 21 USD in XLM to all account holders who ever installed the Keybase app. To get the Lumens, you need to sign in again and claim them - you should have received a bot message with instructions. Keybase has been funded by the Stellar Developer Foundation for years and so this collab is not a one-off. You can choose to keep participating in the Lumens airdrop by using Keybase, the total dollar worth each user can get is 500 USD. New accounts can still participate as long as they have a Github or HackerNews account created before 9 September 2019. more join
BlockWage Airdrops + Bounties Recurring Platform for freelancers marketplace. Airdrops randomly announced via Discord, there's also the possibility of Masternodes. join web
Vaultoro Token Launch Promo September 2019 The crypto-gold exchange Vaultoro has been around for years, getting attention in the 2015 bear market and tagging along through the subsequent bull run. They are now launching their own exchange token which you can get for free if you don't have an account yet. Every new sign up with basic ID verification gets 200 VAULT tokens. homepage make acct