CciLayerConfig
Renders the Commodity Channel Index (CCI) and an optional smoothed CCI line.
Examples
tsx
<CCI length={20} smoothingLength={14} />ts
{
type: 'cci',
length: 20,
smoothingLength: 14,
series: {
value: { color: '#1a1a1a' },
smoothing: { color: '#ef4444' },
},
}Properties
Base Props
type
- Type:
'cci'
length
- Type:
number - Default:
20
The CCI lookback length. The inherited period prop is accepted as an alias.
smoothingLength
- Type:
number - Default:
14
The SMA length used for the smoothing output.
source
- Type:
{ high?: PriceField; low?: PriceField; close?: PriceField }
Optional shorthand for remapping the required price inputs.
series
- Type:
{ value?: false | LineConfig; smoothing?: false | LineConfig }
markers
- Type:
{ value?: false | ValueMarkerConfig; smoothing?: false | ValueMarkerConfig }
Indicator value markers are disabled by default. Set markers.value or markers.smoothing to {} to show one.
Defaults
| Property | Default |
|---|---|
id | 'cci-layer' |
outputs | ['value', 'smoothing'] |
valueGridLines | [-100, 100] |
scale | { key: 'value_auto', domain: 'value', range: { type: 'auto' } } |
TypeScript
ts
interface CciLayerConfig extends BaseLayerConfig {
type: 'cci';
source?: {
high?: PriceField;
low?: PriceField;
close?: PriceField;
};
length?: number;
smoothingLength?: number;
series?: {
value?: false | LineConfig;
smoothing?: false | LineConfig;
};
markers?: {
value?: false | ValueMarkerConfig;
smoothing?: false | ValueMarkerConfig;
};
}