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

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

# Vidya (interface)

Volatility Index Dynamic Average (VIDYA) is a smoothing (moving average) based on dynamically changing periods.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public interface Vidya
```

## Examples

C#:

```csharp
// Indicators.Vidya is obsolete, new code creates a VariableIndexDynamicAverage instead
private VariableIndexDynamicAverage _vidya;

protected override void OnStart()
{
    _vidya = Indicators.VariableIndexDynamicAverage(Bars.ClosePrices, 9, 12);
}

protected override void OnBar()
{
    Print("VIDYA: {0}", _vidya.Result.Last(1));
}

// An existing Vidya instance exposes its values through the Result series
private void PrintVidya(Vidya vidya)
{
    Print("Legacy VIDYA: {0}", vidya.Result.Last(1));
}
```

Python:

```python
# Indicators.Vidya is obsolete, new code creates a VariableIndexDynamicAverage instead
def on_start(self):
    self.vidya = api.Indicators.VariableIndexDynamicAverage(api.Bars.ClosePrices, 9, 12)

def on_bar(self):
    api.Print(f"VIDYA: {self.vidya.Result.Last(1)}")
```

## Inherited members

- `IndicatorDataSeries Result {get;}` (from MovingAverage) [details](https://help.ctrader.com/ctrader-algo/references/Indicators/MovingAverage/Result/index.md)
- `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)

