OptimizationBooleanParameter
record cAlgo.API Since 5.9
DesktopCLICloud
A bool cBot parameter, optimized over a set of values or held fixed.
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 class OptimizationBooleanParameter : OptimizationParameter`1
Namespace: cAlgo.API · Group: Optimization · Inherits: 0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], OptimizationParameter
Examples
var optimized = new OptimizationBooleanParameter("UseTrailingStop", new[] { true, false });
var fixedValue = new OptimizationBooleanParameter("UseStopLoss", true);
Print("{0} optimized: {1}, {2} fixed at {3}", optimized.Name, optimized.IsOptimized, fixedValue.Name, fixedValue.Value);
optimized = OptimizationBooleanParameter("UseTrailingStop", [True, False])
fixedValue = OptimizationBooleanParameter("UseStopLoss", True)
api.Print(f"{optimized.Name} optimized: {optimized.IsOptimized}, {fixedValue.Name} fixed at {fixedValue.Value}")
Constructors
| Name | Description |
|---|---|
| OptimizationBooleanParameter 3 overloadsDesktopCLICloud | Optimizes the parameter over the given values. |
Properties
| Name | Description |
|---|---|
ValuesDesktopCLICloudIReadOnlyList<bool> | Gets the discrete set of values to optimize over. |
Inherited members
From OptimizationParameter: Name, IsOptimized