Lean  $LEAN_TAG$
QuantConnect.Indicators.DetrendedPriceOscillator Class Reference

The Detrended Price Oscillator is an indicator designed to remove trend from price and make it easier to identify cycles. DPO does not extend to the last date because it is based on a displaced moving average. Is estimated as Price {X/2 + 1} periods ago less the X-period simple moving average. E.g.DPO(20) equals price 11 days ago less the 20-day SMA. More...

Inheritance diagram for QuantConnect.Indicators.DetrendedPriceOscillator:
[legend]

Public Member Functions

 DetrendedPriceOscillator (string name, int period)
 Initializes a new instance of the DetrendedPriceOscillator class. More...
 
 DetrendedPriceOscillator (int period)
 Initializes a new instance of the DetrendedPriceOscillator class. More...
 
override void Reset ()
 Resets this indicator to its initial state More...
 

Public Attributes

override bool IsReady => _sma.IsReady && _priceLag.IsReady
 Gets a flag indicating when this indicator is ready and fully initialized More...
 

Protected Member Functions

override decimal ComputeNextValue (IndicatorDataPoint input)
 Computes the next value of this indicator from the given state More...
 

Properties

int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 
- Properties inherited from QuantConnect.Indicators.IIndicatorWarmUpPeriodProvider
int WarmUpPeriod [get]
 Required period, in data points, for the indicator to be ready and fully initialized. More...
 

Detailed Description

The Detrended Price Oscillator is an indicator designed to remove trend from price and make it easier to identify cycles. DPO does not extend to the last date because it is based on a displaced moving average. Is estimated as Price {X/2 + 1} periods ago less the X-period simple moving average. E.g.DPO(20) equals price 11 days ago less the 20-day SMA.

See also
IndicatorBase<IndicatorDataPoint>

Definition at line 26 of file DetrendedPriceOscillator.cs.

Constructor & Destructor Documentation

◆ DetrendedPriceOscillator() [1/2]

QuantConnect.Indicators.DetrendedPriceOscillator.DetrendedPriceOscillator ( string  name,
int  period 
)

Initializes a new instance of the DetrendedPriceOscillator class.

Parameters
nameThe name for the indicator.
periodThe number of periods to calculate the DPO.

Definition at line 46 of file DetrendedPriceOscillator.cs.

◆ DetrendedPriceOscillator() [2/2]

QuantConnect.Indicators.DetrendedPriceOscillator.DetrendedPriceOscillator ( int  period)

Initializes a new instance of the DetrendedPriceOscillator class.

Parameters
periodThe number of periods to calculate the DPO.

Definition at line 59 of file DetrendedPriceOscillator.cs.

Member Function Documentation

◆ Reset()

override void QuantConnect.Indicators.DetrendedPriceOscillator.Reset ( )

Resets this indicator to its initial state

Definition at line 67 of file DetrendedPriceOscillator.cs.

◆ ComputeNextValue()

override decimal QuantConnect.Indicators.DetrendedPriceOscillator.ComputeNextValue ( IndicatorDataPoint  input)
protected

Computes the next value of this indicator from the given state

Parameters
inputThe input given to the indicator
Returns
A new value for this indicator

Definition at line 81 of file DetrendedPriceOscillator.cs.

Member Data Documentation

◆ IsReady

override bool QuantConnect.Indicators.DetrendedPriceOscillator.IsReady => _sma.IsReady && _priceLag.IsReady

Gets a flag indicating when this indicator is ready and fully initialized

Definition at line 34 of file DetrendedPriceOscillator.cs.

Property Documentation

◆ WarmUpPeriod

int QuantConnect.Indicators.DetrendedPriceOscillator.WarmUpPeriod
get

Required period, in data points, for the indicator to be ready and fully initialized.

Definition at line 39 of file DetrendedPriceOscillator.cs.


The documentation for this class was generated from the following file: