iAC

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

Syntax

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

Last updated