Class PercentagePriceOscillator
- Namespace
- FinanceSharp.Indicators
- Assembly
- FinanceSharp.dll
This indicator computes the Percentage Price Oscillator (PPO) The Percentage Price Oscillator is calculated using the following formula: PPO[i] = 100 * (FastMA[i] - SlowMA[i]) / SlowMA[i]
public class PercentagePriceOscillator : AbsolutePriceOscillator, IIndicator, IUpdatable
- Inheritance
-
PercentagePriceOscillator
- Implements
- Inherited Members
- Extension Methods
Constructors
PercentagePriceOscillator(int, int, MovingAverageType)
Initializes a new instance of the PercentagePriceOscillator class using the specified parameters.
public PercentagePriceOscillator(int fastPeriod, int slowPeriod, MovingAverageType movingAverageType = MovingAverageType.Simple)
Parameters
fastPeriodintThe fast moving average period
slowPeriodintThe slow moving average period
movingAverageTypeMovingAverageTypeThe type of moving average to use
PercentagePriceOscillator(string, int, int, MovingAverageType)
Initializes a new instance of the PercentagePriceOscillator class using the specified name and parameters.
public PercentagePriceOscillator(string name, int fastPeriod, int slowPeriod, MovingAverageType movingAverageType = MovingAverageType.Simple)
Parameters
namestringThe name of this indicator
fastPeriodintThe fast moving average period
slowPeriodintThe slow moving average period
movingAverageTypeMovingAverageTypeThe type of moving average to use
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