IIndicatorsAccessor.DetrendedPriceOscillator
method · IIndicatorsAccessor · cAlgo.API.Internals
DesktopCLICloud
The Detrended Price Oscillator shows intermediate overbought and oversold levels.
Definition
DetrendedPriceOscillator DetrendedPriceOscillator(DataSeries source, int periods, MovingAverageType maType)
api.Indicators.DetrendedPriceOscillator(source: DataSeries, periods: int, maType: MovingAverageType) -> DetrendedPriceOscillator
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
source | DataSeries | DataSeries | The price source data used for calculation. |
periods | int | int | The period used for calculation. |
maType | MovingAverageType | MovingAverageType | Type of the Moving Average. |
Returns DetrendedPriceOscillator — Detrended Price Oscillator indicator instance
Examples
var dpoFast = Indicators.DetrendedPriceOscillator(Bars.ClosePrices, 10, MovingAverageType.Simple);
var dpoSlow = Indicators.DetrendedPriceOscillator(Bars.ClosePrices, 30, MovingAverageType.Simple);
if (dpoFast.Result.Last(1) > dpoSlow.Result.Last(1))
Print("Fast DPO is above slow DPO");
dpoFast = api.Indicators.DetrendedPriceOscillator(api.Bars.ClosePrices, 10, MovingAverageType.Simple)
dpoSlow = api.Indicators.DetrendedPriceOscillator(api.Bars.ClosePrices, 30, MovingAverageType.Simple)
if dpoFast.Result.Last(1) > dpoSlow.Result.Last(1):
api.Print("Fast DPO is above slow DPO")