# Price Oscillator

#### Description <a href="#description_88" id="description_88"></a>

This indicator is based on the difference between two moving averages. The difference is measured in absolute values, not in percentages.

#### Usage <a href="#usage_86" id="usage_86"></a>

```csharp
PriceOscillator(int fast, int slow, int smooth)
PriceOscillator(IDataSeries inSeries, int fast, int slow, int smooth)
PriceOscillator(int fast, int slow, int smooth)[int barsAgo]
PriceOscillator(IDataSeries inSeries, int fast, int slow, int smooth)[int barsAgo]
```

#### Return value <a href="#return-value_83" id="return-value_83"></a>

**double**

When using this method with an index (e.g. **PriceOscillator**(12,26,9)\[**int** barsAgo] ), the value of the indicator will be issued for the referenced bar.

#### Parameters <a href="#parameters_76" id="parameters_76"></a>

inSeries Input data series for the indicator

fast Number of bars used for the calculation of the fast EMA

slow Number of bars used for the calculation of the slow EMA

smooth Number of bars used for the calculation of the EMA signal line

#### Visualization <a href="#visualization_81" id="visualization_81"></a>

![Price Oscillator](https://agenatrader.github.io/AgenaIndicator-documentation/media/PriceOscillator.jpg)

#### Example <a href="#example_83" id="example_83"></a>

```csharp
//Output for the value of the price oscillator
Print("The current value for the PPO is " + PriceOscillator(12, 26, 9)[0]);
//Output for the value of the smooth price oscillator
Print("The current value for the smooth is " + PriceOscillator(12, 26, 9).Smoothed[0]);
```
