Type/to search
Built-in Functions
Global
Log
Market
Trade
Account
Futures
Exchange
IO
Network
Storage
Threads
TA
Talib
Overlap Studies
Momentum Indicators
Volume Indicators
talib.AD
talib.ADOSC
talib.OBV
Volatility Indicators
Cycle Indicators
Price Transform
Statistic Functions
Math Transform
Math Operators
Pattern Recognition
OS
Structures
Built-in Variables and Constants
Conventions
Exchanges

Calculates the Chaikin A/D Oscillator.

talib.ADOSC(inPriceHLCV)
talib.ADOSC(inPriceHLCV, optInFastPeriod)
talib.ADOSC(inPriceHLCV, optInFastPeriod, optInSlowPeriod)

Examples

Compute the Chaikin A/D Oscillator (fast 3, slow 10) from the latest K-lines.

javascript
function main() { var records = exchange.GetRecords() if (!records) return var ret = talib.ADOSC(records, 3, 10) Log(ret) }
python
import talib def main(): records = exchange.GetRecords() if not records: return ret = talib.ADOSC(records.High, records.Low, records.Close, records.Volume, 3, 10) Log(ret)

Returns

TypeDescription

numeric array

Indicator values, the same length as the input; the leading values without enough data are NaN.

Arguments

NameTypeRequiredDescription

inPriceHLCV

Record array

Yes

K-line array; the high, low, close and volume fields are used. In Python, pass records.High, records.Low, records.Close, records.Volume in this order.

optInFastPeriod

number

No

Fast period. Default 3.

optInSlowPeriod

number

No

Slow period. Default 10.

See Also

Remarks

TA-Lib equivalent: ADOSC(Records[High,Low,Close,Volume],Fast Period = 3,Slow Period = 10) = Array(outReal).