> 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-level-value.md).

# SetLevelValue

Changes the value of an existing level line.

## Syntax

```typescript
SetLevelValue(index: number, value: number): void
```

## Parameters

* `index` - A number representing the index of the level to modify.
* `value` - A number representing the new Y-value for the level.

## Return Value

This method does not return a value.

## Description

The `SetLevelValue` method changes the Y-value of an existing level line. This can be used to dynamically adjust level positions based on market conditions or user preferences.

## Example

```typescript
// Change the first level (index 0) to value 75
this.api.SetLevelValue(0, 75)

// Change the second level (index 1) to value 25
this.api.SetLevelValue(1, 25)

// Dynamically adjust levels based on volatility
const volatility = this.api.iATR('EURUSD', 14, 0)
this.api.SetLevelValue(0, 50 + volatility * 2)
this.api.SetLevelValue(1, 50 - volatility * 2)
```
