Type/to search
Built-in Functions
Global
Log
Market
Trade
Account
Futures
Exchange
IO
Network
Storage
Threads
TA
Talib
Overlap Studies
talib.ACCBANDS
talib.BBANDS
talib.DEMA
talib.EMA
talib.HT_TRENDLINE
talib.KAMA
talib.MA
talib.MAMA
talib.MAVP
talib.MIDPOINT
talib.MIDPRICE
talib.SAR
talib.SAREXT
talib.SMA
talib.T3
talib.TEMA
talib.TRIMA
talib.WMA
Momentum Indicators
Volume Indicators
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 Kaufman Adaptive Moving Average.

talib.KAMA(inReal)
talib.KAMA(inReal, optInTimePeriod)

Examples

Compute the Kaufman Adaptive Moving Average from the latest K-lines.

javascript
function main() { var records = exchange.GetRecords() if (!records) return var ret = talib.KAMA(records) Log(ret) }
python
import talib def main(): records = exchange.GetRecords() if not records: return ret = talib.KAMA(records.Close) Log(ret)

Returns

TypeDescription

numeric array

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

Arguments

NameTypeRequiredDescription

inReal

Record array / numeric array

Yes

K-line array (close prices are used) or numeric array; in Python, pass a numeric array such as records.Close.

optInTimePeriod

number

No

Calculation period. Default 30.

See Also

Remarks

TA-Lib equivalent: KAMA(Records[Close],Time Period = 30) = Array(outReal).