Detrended Price Osc (Indicator)
Input Information
| Name | Expression | Default | Description |
| Price | Numeric | Close | Price used to calculate the Detrend Price Osc. |
| Length | Numeric | 14 | Number of bars used to calculate the Detrend Price Osc. |
| ColorNormLength | Numeric | 14 | Number of bars over which to normalize the indicator for gradient coloring. |
| UseGradientColoring | boolean | true | When UseGradientColoring is set to true, the plot color varies between UpColor and DnColor based on the value of the indicator. |
| UpColor | Numeric | MyColors( “BurlyWood” ) |
Color to use for indicator values that are relatively high over ColorNormLength bars. The UpColor and DnColor inputs are ignored when UseGradientColoring is set to false. If not using gradient coloring, plot colors may be set on the Color tab of the Customize Indicator dialog box. |
| DnColor | Numeric | Magenta |
Color to use for indicator values that are relatively low over ColorNormLength bars. The UpColor and DnColor inputs are ignored when UseGradientColoring is set to false. If not using gradient coloring, plot colors may be set on the Color tab of the Customize Indicator dialog box. |
| GridForegroundColor | Numeric | Black | Color to use for numbers in RadarScreen cells when gradient coloring is enabled, that is, when both UpColor and DnColor are set to non-negative values. |
Market Synopsis
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. 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.
Plot Information
| Number | Name | Default Color | Description |
| Plot1 | DPO | Yellow/Magenta | Plots the Detrend Price Osc as a line. |
| Plot2 | ZeroLine | Dark Green | Plots a horizontal line at zero. |
When applied to a chart, this indicator contains two plots, displayed in a separate subgraph from the price data.
Set either UpColor and/or DnColor to -1 to disable gradient plot coloring. When disabled, Plot1 color is determined by settings in indicator properties dialog box. Plot2 (ZeroLine) color always comes from indicator properties dialog box.