Skip to content

OptimizationParameter.IsOptimized

property · OptimizationParameter · cAlgo.API Since 5.9

DesktopCLICloud

Gets a value indicating whether the parameter is included in the sweep. When false, the parameter is held fixed at its value.

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 bool IsOptimized {get;}
optimizationParameter.IsOptimized: bool

Returns bool

Examples

OptimizationParameter optimized = new OptimizationIntegerParameter("SlowPeriods", 20, 100, 10);
OptimizationParameter fixedValue = new OptimizationIntegerParameter("FastPeriods", 9);
Print("{0}: {1}, {2}: {3}", optimized.Name, optimized.IsOptimized, fixedValue.Name, fixedValue.IsOptimized);
optimized = OptimizationIntegerParameter("SlowPeriods", 20, 100, 10)
fixedValue = OptimizationIntegerParameter("FastPeriods", 9)
api.Print(f"{optimized.Name}: {optimized.IsOptimized}, {fixedValue.Name}: {fixedValue.IsOptimized}")