---
id: "T:cAlgo.API.Indicators.OscillatorMovingAverage"
kind: "interface"
namespace: "cAlgo.API.Indicators"
url: "https://help.ctrader.com/ctrader-algo/references/Indicators/OscillatorMovingAverage/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# OscillatorMovingAverage (interface)

The calculation of the Oscillator of a Moving Average.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public interface OscillatorMovingAverage
```

## Examples

C#:

```csharp
private OscillatorMovingAverage _oscillatorMovingAverage;

protected override void OnStart()
{
    var rsi = Indicators.RelativeStrengthIndex(Bars.ClosePrices, 14);
    _oscillatorMovingAverage = Indicators.OscillatorMovingAverage(rsi.Result, 9, MovingAverageType.Simple);
}

protected override void OnBar()
{
    Print("Oscillator of a Moving Average: {0}", _oscillatorMovingAverage.Histogram.Last(1));
}
```

Python:

```python
def on_start(self):
    rsi = api.Indicators.RelativeStrengthIndex(api.Bars.ClosePrices, 14)
    self.oscillatorMovingAverage = api.Indicators.OscillatorMovingAverage(rsi.Result, 9, MovingAverageType.Simple)

def on_bar(self):
    api.Print(f"Oscillator of a Moving Average: {self.oscillatorMovingAverage.Histogram.Last(1)}")
```

## Properties

- `IndicatorDataSeries Histogram {get;}` — The Oscillator of a Moving Average is a technical indicator that shows the difference between an oscillator and its moving average over a given period of time. [details](https://help.ctrader.com/ctrader-algo/references/Indicators/OscillatorMovingAverage/Histogram/index.md)

## Inherited members

- `ChartIndicator AddToChart()` (from StandardIndicator) [details](https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/AddToChart/index.md)
- `Symbol Symbol {get;}` (from StandardIndicator) [details](https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/Symbol/index.md)
- `TimeFrame TimeFrame {get;}` (from StandardIndicator) [details](https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/TimeFrame/index.md)
- `Bars Bars {get;}` (from StandardIndicator) [details](https://help.ctrader.com/ctrader-algo/references/General/StandardIndicator/Bars/index.md)

