> For the complete documentation index, see [llms.txt](https://fto-2.gitbook.io/fto-indicators-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fto-2.gitbook.io/fto-indicators-docs/configure_indicator/set-index-label.md).

# SetIndexLabel

Sets a label for a buffer.

## Syntax

```typescript
SetIndexLabel(bufferIndex: number, bufferName: string): void
```

## Parameters

* `bufferIndex` - A number representing the index of the buffer.
* `bufferName` - A string containing the label for the buffer.

## Return Value

This method does not return a value.

## Description

The `SetIndexLabel` method sets a descriptive label for a buffer. This label is displayed in the indicator's legend and in tooltips when hovering over the indicator on the chart.

## Example

```typescript
// Set labels for Bollinger Bands buffers
this.api.SetIndexLabel(0, 'Upper Band')
this.api.SetIndexLabel(1, 'Middle Band')
this.api.SetIndexLabel(2, 'Lower Band')

// Set labels for MACD buffers
this.api.SetIndexLabel(0, 'MACD Line')
this.api.SetIndexLabel(1, 'Signal Line')
this.api.SetIndexLabel(2, 'Histogram')
```
