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
Bitfinex KSM Staking Launched 25 Feb Bitfinex opened staking of Kusama tokens with expected staking rewards of ~8% p.a. To start staking KSM, deposit your tokens into your exchange wallet on Bitfinex, or buy the tokens on the exchange. First payout will arrive on 3rd March. sign up with fee discount
PheMex Twitter Bounty Live Phemex is a crypto derivatives platform (new and therefore not to be trusted too much) that is trying to fill the hole after BitMex. They do not require KYC for now, word of caution. PheMex is trying to build up their Twitter account and promise to give away the total of 1x 10k worth of BTC as well as loads of smaller prizes in gift cards and such, if you help them shill their Twitter handle. Phemex account is needed, sign up with code H7QPW to get welcome bonus. sign up with bonus and view the prizes
DOT and GRT trading fee discount (reliable exchange, easy KYC) Until 9 March Polkadot and The Graph trading has been enabled on the Aussie exchange Independent Reserve in fiat pairs with AUD, NZD, SGP and USD. (International deposits available, KYC individual). The trading fee is 0.1% flat for accounts without premium or volume discount for the first two weeks of trading. info
Pulse Network Reward Competition Until Mid March Pulse network is opening a competition where the most active social media shills get rewarded from a prize pool of 10k+ USD. Top 50 shills get at least 430 USD worth. info
BitFuFu Bounty Promo Until end of Feb BitFuFu is a cloud mining pool that gives a bounty to approved users for online promo. Bounty is paid out weekly in stablecoin. request entry
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
Armor Network Early Mining Opportunity For a few weeks now Armor Network is a fast, anonymous and untraceable cryptocurrency integrated into Telegram ecosystem. No ICO, no premine. Genesis block 21 Jan, mining rewards are still high. WARNING: Right now uses a Telegram wallet, so you don't own the private key. info
Bitfinex Global Grid Competition Until 21 Feb Bitfinex intermediate verified users can enter any of the 4 trading competitions and fight for prize pool of 50k USDt. More information in the banner at the top of the chart in Bitfinex trading interface. sign up
Zappermint bounty Weekly Zappermint is a token for monetization of game apps. They run a weekly social media bounty that must be reported and claimed via bitcointalk. thread
Opportunity: DeFi Tokens on reputable exchange with lower fees 14 days after listing The Aussie exchange Independent reserve is listing new DeFi tokens these days. For each of the new markets has the fee reduced to 0.1% for the first 2 weeks. Currently those markets are yearn.finance, Aave and Kyber Network Crystal. sign up
Earn YoBit's YoDefi tokens Live YoBit set up their own defi project for liquidity on the exchange. The exchange pays out 777 YoDefi Tokens proportionally for all users every 10 mins. sign up
Staking without KYC on WhiteBit New! WhiteBit opened 17 different staking plans with 9 different currencies to choose from. 40% APR, available to the users without KYC. (Be mindful of risks) sign up