# iAC

Calculates the Accelerator Oscillator (AC) indicator value for any symbol and timeframe.

## Syntax

```typescript
iAC(
symbol: string,
timeframe: number,
index: number,
periodFast: number,
periodSlow: number,
periodSignal: number,
maType: E_MAType,
applyToPrice: TPriceType,
bufferIdx: 0 | 1
): number
```

## Parameters

| Parameter    | Type       | Description                                             |
| ------------ | ---------- | ------------------------------------------------------- |
| symbol       | string     | Symbol name                                             |
| timeframe    | number     | Timeframe in minutes                                    |
| index        | number     | Index of the bar to calculate AC for                    |
| periodFast   | number     | Fast MA period for AO calculation (default 5)           |
| periodSlow   | number     | Slow MA period for AO calculation (default 34)          |
| periodSignal | number     | Signal line period for AC calculation (default 5)       |
| maType       | E\_MAType  | Moving average type (typically SMA)                     |
| applyToPrice | TPriceType | Type of price to use (typically Median Price HL2)       |
| bufferIdx    | 0 \| 1     | Buffer index: 0 = AC values, 1 = Color/histogram values |

## Return Value

Returns a `number` representing the Accelerator Oscillator value at the specified bar index.

## Description

Calculates the Accelerator Oscillator (AC) indicator.

## Example

```typescript
const ac = this.api.iAC('EURUSD', 60, 0, 5, 34, 5, E_MAType.MODE_SMA, TPriceType.PRICE_HL2, 0)
```
