talib.cci
Commodity Channel Index for source over length bars.
The source is an argument rather than a fixed price, so the index can be run on anything a script computes.
talib.cci(series float source, series int length) → series float| Parameter | Type | Required | Description |
|---|---|---|---|
source | series float | yes | The series the index is calculated on. |
length | series int | yes | How many bars the calculation covers. |
Returns series float — A series float oscillator value.
indicator("Commodity Channel Index")
plot(talib.cci(hlc3, 20))See also talib.alma · talib.atr · talib.barssince
Part of the function index.
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.