iAO

Calculates the Awesome Oscillator (AO) indicator value for any symbol and timeframe.

Syntax

iAO(
    symbol: string,
    timeframe: number,
    index: number,
    periodFast: number,
    periodSlow: 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 AO for

periodFast

number

Fast MA period (default 5)

periodSlow

number

Slow MA period (default 34)

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 = AO values, 1 = Color/histogram values

Return Value

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

Description

Calculates the Awesome Oscillator (AO) indicator.

Example

Last updated