> 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/external_parameters_definition/set-option-range.md).

# SetOptionRange

Sets the valid range for a numeric option.

## Syntax

```typescript
SetOptionRange(name: string, lowValue: number, highValue: number): void
```

## Parameters

* `name` - A string containing the name of the option to set the range for.
* `lowValue` - A number representing the minimum allowed value.
* `highValue` - A number representing the maximum allowed value.

## Return Value

This method does not return a value.

## Description

The `SetOptionRange` method sets the valid range for a numeric option. This is used to define the minimum and maximum values that users can input for a numeric option in an indicator or strategy.

## Example

```typescript
// Register a period option
this.api.RegOption("Period", TOptionType.INTEGER, 14);

// Set the valid range for the period option (1 to 200)
this.api.SetOptionRange("Period", 1, 200);

// Register a level option
this.api.RegOption("Overbought Level", TOptionType.DOUBLE, 70);

// Set the valid range for the level option (50 to 100)
this.api.SetOptionRange("Overbought Level", 50, 100);
```

## Related Methods

* [`SetOptionStep`](/fto-indicators-docs/external_parameters_definition/set-option-step.md) — set the increment step in the settings UI
* [`SetOptionDigits`](/fto-indicators-docs/external_parameters_definition/set-option-digits.md) — set decimal precision for display
