OptimizationEnumParameter
record cAlgo.API Since 5.9
DesktopCLICloud
An enum cBot parameter, optimized over a set of members or held fixed. The CLR enum type is resolved from the cBot metadata, so members are supplied by their string names.
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 OptimizationEnumParameter : OptimizationParameter`1
Namespace: cAlgo.API · Group: Optimization · Inherits: 0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], OptimizationParameter
Examples
var optimized = new OptimizationEnumParameter("MAType", new[] { "Simple", "Exponential", "Weighted" });
var fixedValue = new OptimizationEnumParameter("Source", "Close");
Print("{0} values: {1}, {2} fixed at {3}", optimized.Name, optimized.Values.Count, fixedValue.Name, fixedValue.Value);
optimized = OptimizationEnumParameter("MAType", ["Simple", "Exponential", "Weighted"])
fixedValue = OptimizationEnumParameter("Source", "Close")
api.Print(f"{optimized.Name} values: {optimized.Values.Count}, {fixedValue.Name} fixed at {fixedValue.Value}")
Constructors
| Name | Description |
|---|---|
| OptimizationEnumParameter 3 overloadsDesktopCLICloud | Optimizes over the enum members named by the given values. |
Properties
| Name | Description |
|---|---|
ValuesDesktopCLICloudIReadOnlyList<string> | Gets the discrete set of enum member names to optimize over. |
Inherited members
From OptimizationParameter: Name, IsOptimized