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

Published in Crypto technical analysis · Labeled as ScriptSpotlight ·

The Detrended Price Oscillator strategy tool from TradingView is similar to a moving average, but easier to read.

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.

Category: Crypto technical analysis · Label: ScriptSpotlight · Author: Karlvonbahnhof (contact author)

Want to *really* learn crypto charting & technical analysis?

Hate to break it to you, but there's no trading school, no neatly structured course and no simple how to.
Read our articles to get familiar with the tools, but try everything hands on. Trading will press your emotions, you can only really learn it as you go.

All the good crypto charting tools and platforms are accessible for FREE in either TradingView app or at Bitfinex. Just start!

Get TradingView Signup at Bitfinex

 

 

Last added to Crypto Airdrops, Bounties & Opportunities
Airdropped Token or Opportunity Airdrop Date About the airdrop Link
$DOT Polka Drop NFT Raffle Live Polka City is a contract-based Polkadot, DeFİ and, NFT cryptocurrency investment platform. They are running a raffle now where purchasing a ticket gets you chance to win an NFT art gallery that pays weekly yield and other commission-generating prizes. Cost of the ticket is 1000 POLC, the main prize generates 1041 POLC per week (50% APY). join
Searching for PIZZA MAN on Phemex Until 22 May (The BTC Pizza Day) To promote their new asset management service, Phemex is opening a quest to search for the og guy who spent 10K BTC on a pizza (Laszlo Hanyecz). They are going to offer him, and 100 winners, to get 1 day of interests on 10k BTC in the Phemex Earn Crypto asset management program. Earn Crypto promises up to 10% APY. Yearly compound rate of 10% translates to about 0.03% daily rate, which could earn up to 3 BTC during that single day. make account on phemex and submit gleam form
Binance to launch NFT marketplace June 2021 If you have not already, join Binance with referral code atnet10perc for 10% lifetime kickback. join
CoinBurp NFT Airdrop Until 7 May Coinburp drops BURP NFT tokens for easy social media follows. It is a governance and utility token and non-custodial NFT app. You gain 10 $BURP tokens for joining our community. gleam form
$ARN token airdrop Until 9 May ARN tokens up for grabs for a set of 8 easy social media tasks. join
$XYM Token giveaway on Latoken Until 10 May Complete simple social media tasks and get a chance to win 1000 XYM tokens ($230) in the giveaway on LATOKEN. join
SafeCovid huge marketing bounty Live SafeCovid is running a vast campaign for all types of content marketing. Blogs, videos, social media - there are categories for all types of content. Submissions need to be posted in bitcointalk thread and recorded into Google Spreadsheets. bitcointalk
Trade tokenized shares of Coinbase on FTX Open The FTX crypto derivative exchange, quickly gaining recognition in the crypto community, added tokenized trading of Coinbase IPO. Loads of other tokenized legacy assets already available. FTX does not require KYC until your total lifetime withdrawals reach 1000 USD. (More about FTX here). see the markets
PYR social media campaign March 14, 2021 for 6 Months till August 14 2021. PYR runs a long social media campaign. You need to engage in various social media channels without mentioning the bounty. Rules in the sign up form. form
Opportunity: Zero fees on DeFi tokens on Bitstamp Until end of May 2021 You can now trade ZRX, MKR, KNC, DAI and GUSD at Bitstamp. Aa a bonus this DeFi-focused batch of cryptocurrencies comes with zero trading fees until the end of May. If you have an old Bitstamp account laying about, might be worth a shot to trade or arbitrage there for a few weeks now. Bitstamp
Blockchain Space Telegram Bounty Until June 2021 Blockchain Space runs a Telegram activity bounty. The most active users will be paid 50 USDT every 15 days. info