OptimizationParameter
record cAlgo.API Since 5.9
DesktopCLICloud
Base type for a cBot parameter's optimization configuration. One derived record exists for each AlgoParameterType.
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.
Definition
public abstract class OptimizationParameter
Namespace: cAlgo.API · Group: Optimization
Examples
var parameters = new OptimizationParameter[]
{
new OptimizationIntegerParameter("SlowPeriods", 20, 100, 10),
new OptimizationBooleanParameter("UseTrailingStop", false)
};
foreach (var parameter in parameters)
Print("{0} optimized: {1}", parameter.Name, parameter.IsOptimized);
parameters = [OptimizationIntegerParameter("SlowPeriods", 20, 100, 10), OptimizationBooleanParameter("UseTrailingStop", False)]
for parameter in parameters:
api.Print(f"{parameter.Name} optimized: {parameter.IsOptimized}")
Properties
| Name | Description |
|---|---|
IsOptimizedDesktopCLICloudbool | Gets a value indicating whether the parameter is included in the sweep. When false, the parameter is held fixed at its value. |
NameDesktopCLICloudstring | Gets the cBot parameter name (must match its property name). |