OptimizationTimeSpanParameter
record cAlgo.API Since 5.9
DesktopCLICloud
A TimeSpan cBot parameter, optimized over a range 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 OptimizationTimeSpanParameter : OptimizationParameter`1
Namespace: cAlgo.API · Group: Optimization · Inherits: 0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], OptimizationParameter
Examples
var maxHoldTime = new OptimizationTimeSpanParameter("MaxHoldTime", TimeSpan.FromHours(1), TimeSpan.FromHours(8), TimeSpan.FromHours(1));
var cooldown = new OptimizationTimeSpanParameter("Cooldown", TimeSpan.FromMinutes(30));
Print("{0}: {1} to {2} by {3}, {4} fixed at {5}", maxHoldTime.Name, maxHoldTime.Min, maxHoldTime.Max, maxHoldTime.Step, cooldown.Name, cooldown.Value);
from System import TimeSpan
maxHoldTime = OptimizationTimeSpanParameter("MaxHoldTime", TimeSpan.FromHours(1), TimeSpan.FromHours(8), TimeSpan.FromHours(1))
cooldown = OptimizationTimeSpanParameter("Cooldown", TimeSpan.FromMinutes(30))
api.Print(f"{maxHoldTime.Name}: {maxHoldTime.Min} to {maxHoldTime.Max} by {maxHoldTime.Step}, {cooldown.Name} fixed at {cooldown.Value}")
Constructors
| Name | Description |
|---|---|
| OptimizationTimeSpanParameter 3 overloadsDesktopCLICloud | Optimizes the parameter over the range the minimum to the maximum by the step. |
Properties
| Name | Description |
|---|---|
MaxDesktopCLICloudTimeSpan | Gets the inclusive maximum of the range. |
MinDesktopCLICloudTimeSpan | Gets the inclusive minimum of the range. |
StepDesktopCLICloudTimeSpan | Gets the step of the range. |
Inherited members
From OptimizationParameter: Name, IsOptimized