Download: DETRENDEDPRICEOSC.ELA
Category: Indicator > Cycle Analysis
Description:
The Detrend Price Osc indicator is similar to a moving average, in that it filters out trends in prices to more easily identify cycles. The indicator is an attempt to define cycles in a trend by drawing a moving average as a horizontal straight line and placing prices along the line according to their relation to a moving average. It provides a means of identifying underlying cycles not apparent when the moving average is viewed within a price chart.
Usage:
Cycles of a longer duration than the Length (number of bars used to calculate the Detrend Price Osc) are effectively filtered or removed by the oscillator.
Inputs:
Price - Price used to calculate the Detrend Price Osc
Length - Number of bars used to calculate the Detrend Price Osc
EasyLanguage Code:
INPUTS: PRICE(CLOSE), LENGTH(14);
VARIABLES: DPO(0);
DPO = DETREND(PRICE, LENGTH);
IF DPO <> -1 THEN
PLOT1(DPO, "DETREND OSC");
PLOT2(0, "ZEROLINE");