OptimizationIntegerParameter constructor
constructor · OptimizationIntegerParameter · cAlgo.API Since 5.9
DesktopCLICloud
Optimizes the parameter over the range the minimum to the maximum by the step.
Environment behaviour
CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.
Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.
Overloads
| Signature | Description |
|---|---|
OptimizationIntegerParameter(string name, int min, int max, int step) | Optimizes the parameter over the range the minimum to the maximum by the step. |
OptimizationIntegerParameter(string name, int value) | Holds the parameter fixed at the given value. |
OptimizationIntegerParameter(OptimizationIntegerParameter original) |
OptimizationIntegerParameter(string name, int min, int max, int step)
Optimizes the parameter over the range the minimum to the maximum by the step.
public OptimizationIntegerParameter(string name, int min, int max, int step)
OptimizationIntegerParameter(name: str, min: int, max: int, step: int)
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
name | string | str | The cBot parameter name. |
min | int | int | The inclusive minimum of the range. |
max | int | int | The inclusive maximum of the range. |
step | int | int | The step of the range. |
Examples
var parameter = new OptimizationIntegerParameter("SlowPeriods", 20, 100, 10);
Print("{0} is optimized: {1}", parameter.Name, parameter.IsOptimized);
parameter = OptimizationIntegerParameter("SlowPeriods", 20, 100, 10)
api.Print(f"{parameter.Name} is optimized: {parameter.IsOptimized}")
OptimizationIntegerParameter(string name, int value)
Holds the parameter fixed at the given value.
public OptimizationIntegerParameter(string name, int value)
OptimizationIntegerParameter(name: str, value: int)
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
name | string | str | The cBot parameter name. |
value | int | int | The fixed value. |
Examples
var parameter = new OptimizationIntegerParameter("FastPeriods", 9);
Print("{0} is fixed at {1}", parameter.Name, parameter.Value);
parameter = OptimizationIntegerParameter("FastPeriods", 9)
api.Print(f"{parameter.Name} is fixed at {parameter.Value}")
OptimizationIntegerParameter(OptimizationIntegerParameter original)
public OptimizationIntegerParameter(OptimizationIntegerParameter original)
OptimizationIntegerParameter(original: OptimizationIntegerParameter)
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
original | OptimizationIntegerParameter | OptimizationIntegerParameter |