# 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)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fto-2.gitbook.io/fto-indicators-docs/configure_indicator/set-level-value.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
