Built-in Functions
Structures
Built-in Variables and Constants
Conventions
Exchanges
talib.ADOSC
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
| Type | Description |
numeric array | Indicator values, the same length as the input; the leading values without enough data are |
Arguments
| Name | Type | Required | Description |
inPriceHLCV |
| Yes | K-line array; the high, low, close and volume fields are used. In Python, pass |
optInFastPeriod | number | No | Fast period. Default |
optInSlowPeriod | number | No | Slow period. Default |
See Also
Remarks
TA-Lib equivalent: ADOSC(Records[High,Low,Close,Volume],Fast Period = 3,Slow Period = 10) = Array(outReal).