Home/Dovee/Function reference

kama

Kaufman adaptive moving average.

Reference/Moving averages/Function

kama(source, length, fast, slow)

Speeds up in trends and slows in chops, using an efficiency ratio. Defaults: length 14, fast 2, slow 30.

Parameters

NameTypeDescription
sourceoptionalseries
default close
Series to use. Omit it when the first argument is a number — ema(9) means ema(close, 9).
lengthint
default 14
Lookback in bars. Default 14.
fastoptionalint
default 2
Fast SC period.
slowoptionalint
default 30
Slow SC period.

Return value

series

Short form: if the first argument is a number, Dovee uses close as the source.

Example

line = kama(close, 14)
plot line as "KAMA"

See also