Detrended Price Oscillator
DetrendedPriceOscillator(Vector, Periods, MA Type)
DPO(Vector, Periods, MA Type)
Similar to the Price Oscillator except DPO is used when long-term trends or
outliers make the underlying price difficult to analyze.
Buying occurs when the oscillator rises. Selling occurs when the oscillator falls.
MA Type: SIMPLE
set BUY = DPO(CLOSE, 20, SIMPLE) > 0
Evaluates to buy when the Detrended Price Oscillator is in positive territory.