Commodity channel index

ccioscillatorsForge API 1

Distance from the average in units of mean deviation.

Inputs

NameTypeDefaultRange
sourcesourcehlc3
periodint141 to 5000

Outputs

NameTypeRequiredDescription
ccivalueOptionalcolor theme.accent, style line, width 1
Warm-up
period - 1 bars (13 at the defaults)
Repaints
No
Parity
TA-Lib, within 1e-9

Formula

The typical price by default

CCI = (x - SMA) / (0.015 * mean absolute deviation) over the last period values

No deviation reads 0.