> 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/get-buffer-value.md).

# Get buffer value

Retrieves a value from a specific buffer at a given index.

## Syntax

```typescript
this.someBuffer.getValue(index);
```

## Parameters

* `index` - A number representing the position in the buffer to retrieve the value from.

## Return Value

Returns a `number` representing the value stored at the specified position in the buffer.

## Description

The `getValue` method of a buffer object retrieves a value from a specific buffer at a given index. This is useful for accessing previously calculated values or values from other buffers during indicator calculations.

## Example

```typescript
// Get the value from buffer 0 at the current bar
const currentValue = this.someBuffer.getValue(0);

// Get the value from buffer 0 at the previous bar
const previousValue = this.someBuffer.getValue(1);

// Get a value from another buffer
const signalValue = this.someBuffer.getValue(0);

// Use values in calculations
const difference = currentValue - signalValue;
```
