Class DetrendedPriceOscillator
- Namespace
- FinanceSharp.Indicators
- Assembly
- FinanceSharp.dll
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.
public class DetrendedPriceOscillator : IndicatorBase, IIndicator, IUpdatable
- Inheritance
-
DetrendedPriceOscillator
- Implements
- Inherited Members
- Extension Methods
Constructors
DetrendedPriceOscillator(int)
Initializes a new instance of the DetrendedPriceOscillator class.
public DetrendedPriceOscillator(int period)
Parameters
periodintThe number of periods to calculate the DPO.
DetrendedPriceOscillator(string, int)
Initializes a new instance of the DetrendedPriceOscillator class.
public DetrendedPriceOscillator(string name, int period)
Parameters
Properties
IsReady
Gets a flag indicating when this indicator is ready and fully initialized
public override bool IsReady { get; }
Property Value
WarmUpPeriod
Required period, in data points, for the indicator to be ready and fully initialized.
public override int WarmUpPeriod { get; }
Property Value
Methods
Forward(long, DoubleArray)
Computes the next value of this indicator from the given state
protected override DoubleArray Forward(long time, DoubleArray input)
Parameters
timelonginputDoubleArrayThe input given to the indicator
Returns
- DoubleArray
A new value for this indicator
Reset()
Resets this indicator to its initial state
public override void Reset()