# ChartIndicator (@salmonui/charts/chart)

> The ChartIndicator interface of @salmonui/charts/chart: A technical indicator over a series, drawn by the analysis layer.

Canonical: https://salmonui.dev/docs/reference/charts/chart/ChartIndicator

```ts
import type { ChartIndicator } from '@salmonui/charts/chart';
```

Entry index: https://salmonui.dev/docs/reference/charts/chart (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/charts/chart.md).

## Reference

Kind: interface

```ts
interface ChartIndicator {
    readonly id?: string | undefined;
    readonly kind: 'sma' | 'ema' | 'tma' | 'momentum' | 'rsi' | 'atr' | 'accumulationDistribution' | 'bollinger' | 'macd' | 'stochastic';
    readonly seriesId: string;
    readonly period?: number | undefined;
    readonly field?: 'close' | 'open' | 'high' | 'low' | undefined;
    readonly deviations?: number | undefined;
    readonly fastPeriod?: number | undefined;
    readonly slowPeriod?: number | undefined;
    readonly signalPeriod?: number | undefined;
    readonly kPeriod?: number | undefined;
    readonly dPeriod?: number | undefined;
    readonly display?: 'line' | 'histogram' | 'both' | undefined;
    readonly zones?: boolean | {
        readonly upper?: number | undefined;
        readonly lower?: number | undefined;
    } | undefined;
    readonly yAxis?: string | undefined;
    readonly name?: string | undefined;
    readonly color?: string | undefined;
}
```

A technical indicator over a series, drawn by the analysis layer.

Members (16):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `id` | `readonly id?: string \| undefined;` | optional |  |
| `kind` | `readonly kind: 'sma' \| 'ema' \| 'tma' \| 'momentum' \| 'rsi' \| 'atr' \| 'accumulationDistribution' \| 'bollinger' \| 'macd' \| 'stochastic';` |  |  |
| `seriesId` | `readonly seriesId: string;` |  | The source series (its id, name or yField). |
| `period` | `readonly period?: number \| undefined;` | optional | Default 14 (Bollinger 20). |
| `field` | `readonly field?: 'close' \| 'open' \| 'high' \| 'low' \| undefined;` | optional | Value column of an OHLC series; default `'close'` (the y values of other series). |
| `deviations` | `readonly deviations?: number \| undefined;` | optional | Bollinger band width in standard deviations (default 2). |
| `fastPeriod` | `readonly fastPeriod?: number \| undefined;` | optional |  |
| `slowPeriod` | `readonly slowPeriod?: number \| undefined;` | optional |  |
| `signalPeriod` | `readonly signalPeriod?: number \| undefined;` | optional |  |
| `kPeriod` | `readonly kPeriod?: number \| undefined;` | optional |  |
| `dPeriod` | `readonly dPeriod?: number \| undefined;` | optional |  |
| `display` | `readonly display?: 'line' \| 'histogram' \| 'both' \| undefined;` | optional | MACD parts (default `'both'`). |
| `zones` | `readonly zones?: boolean \| {     readonly upper?: number \| undefined;     readonly lower?: number \| undefined; } \| undefined;` | optional | RSI and Stochastic overbought / oversold lines and band (default 70 / 30 and 80 / 20). |
| `yAxis` | `readonly yAxis?: string \| undefined;` | optional | Axis for the values: an `axes` entry, usually in its own pane. Oscillators get a secondary axis otherwise. |
| `name` | `readonly name?: string \| undefined;` | optional |  |
| `color` | `readonly color?: string \| undefined;` | optional | Data color, not a theme token. |
