The Detrended Price Oscillator attempts to remove trend from price in order to allow identification of cycles more easily. Cycles longer than the period specified for the indicator are removed, leaving only the shorter-term cycles. DPO is displaced to the left so that the indicator is aligned with the peaks and troughs in price.
How this indicator works
DPO is used to identify cycles with its peaks and troughs. Cycles can be estimated by counting the periods between peaks or troughs. Users can experiment with shorter and longer DPO settings to find the best fit.
DPO = Close (n/2 + 1 Periods ago) – n Period SMA