---
id: "T:cAlgo.API.OptimizationIntegerParameter"
kind: "record"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# OptimizationIntegerParameter (record)

An `int` cBot parameter, optimized over an integer range or held fixed.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

## Definition

```csharp
public class OptimizationIntegerParameter : OptimizationParameter`1
```

Available since cAlgo.API 5.9.

## Examples

C#:

```csharp
var slowPeriods = new OptimizationIntegerParameter("SlowPeriods", min: 20, max: 100, step: 10);
var fastPeriods = new OptimizationIntegerParameter("FastPeriods", 9);
Print("{0}: {1} to {2} by {3}, {4} fixed at {5}", slowPeriods.Name, slowPeriods.Min, slowPeriods.Max, slowPeriods.Step, fastPeriods.Name, fastPeriods.Value);
```

Python:

```python
slowPeriods = OptimizationIntegerParameter("SlowPeriods", 20, 100, 10)
fastPeriods = OptimizationIntegerParameter("FastPeriods", 9)
api.Print(f"{slowPeriods.Name}: {slowPeriods.Min} to {slowPeriods.Max} by {slowPeriods.Step}, {fastPeriods.Name} fixed at {fastPeriods.Value}")
```

## Constructors

- `public OptimizationIntegerParameter(string name, int min, int max, int step)` — Optimizes the parameter over the range the minimum to the maximum by the step. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Constructor/index.md)
- `public OptimizationIntegerParameter(string name, int value)` — Holds the parameter fixed at the given value. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Constructor/index.md)
- `public OptimizationIntegerParameter(OptimizationIntegerParameter original)` —  [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Constructor/index.md)

## Properties

- `public int Max {get;}` — Gets the inclusive maximum of the range. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Max/index.md)
- `public int Min {get;}` — Gets the inclusive minimum of the range. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Min/index.md)
- `public int Step {get;}` — Gets the step of the range. [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationIntegerParameter/Step/index.md)

## Inherited members

- `public string Name {get;}` (from OptimizationParameter) [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationParameter/Name/index.md)
- `public bool IsOptimized {get;}` (from OptimizationParameter) [details](https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationParameter/IsOptimized/index.md)

