Lean
$LEAN_TAG$
|
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...
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... | |
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.
Definition at line 26 of file DetrendedPriceOscillator.cs.
QuantConnect.Indicators.DetrendedPriceOscillator.DetrendedPriceOscillator | ( | string | name, |
int | period | ||
) |
Initializes a new instance of the DetrendedPriceOscillator class.
name | The name for the indicator. |
period | The number of periods to calculate the DPO. |
Definition at line 46 of file DetrendedPriceOscillator.cs.
QuantConnect.Indicators.DetrendedPriceOscillator.DetrendedPriceOscillator | ( | int | period | ) |
Initializes a new instance of the DetrendedPriceOscillator class.
period | The number of periods to calculate the DPO. |
Definition at line 59 of file DetrendedPriceOscillator.cs.
override void QuantConnect.Indicators.DetrendedPriceOscillator.Reset | ( | ) |
Resets this indicator to its initial state
Definition at line 67 of file DetrendedPriceOscillator.cs.
|
protected |
Computes the next value of this indicator from the given state
input | The input given to the indicator |
Definition at line 81 of file DetrendedPriceOscillator.cs.
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.
|
get |
Required period, in data points, for the indicator to be ready and fully initialized.
Definition at line 39 of file DetrendedPriceOscillator.cs.