Detrended Price Oscillator
The Detrended Price Oscillator is a lagging, oscillating cycle indicator. First determine the cycle period of the stock; which is the rhythmic repetition of its highs and lows. The DPO compares the past price to a displaced moving average. The displacement equals (period / 2) + 1. Adjustable guides are given to fine tune the signals. The user may change the input (close), method (SMA), period length and guide values. This indicator’s definition is further expressed in the condensed code given in the calculation below.
How To Trade Using Detrended Price Oscillator
Adjust the top and bottom guides to control the quantity and quality of the trading signals. If the DPO has peaked above the top guide a sell signal will be generated. Conversely, if the DPO troughs below the bottom guide a buy signal will be given. The 0 line divides the bulls (above) from the bears (below).
How To Access in MotiveWave
Go to the top menu, choose Study>Oscillators>Detrended Price Oscillator
or go to the top menu, choose Add Study, start typing in this study name until you see it appear in the list, click on the study name, click OK.
Important Disclaimer: The information provided on this page is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security. Please see our Risk Disclosure and Performance Disclaimer Statement.
Calculation
//input = price (user defined, default is closing price)
//method = moving average (user defined, default is SMA)
//period user defined, default is 20, adjust to rhythm of stock
//LT = lessThan
//MT = moreThan
//disp = displace, index = current bar number
disp = (period / 2) + 1;
dispSma = ma(method, index-disp, period, input);
Plot: DPO = price - dispSma;
//Signals
prevDpo = DPO[index-1];
highSell = dpo for last sell signal, reset to max_negative at each buy signal;
lowBuy = dpo for last buy signal, reset to max_positive at each sell signal;
sell = (dpo MT topGuide) AND (prevDpo MT dpo) AND (dpo MT highSell);
buy = (dpo LT bottGuide AND prevDpo LT dpo) AND (dpo LT lowBuy);