Skip to content

OptimizationDateTimeParameter

record cAlgo.API Since 5.9

DesktopCLICloud

A DateTime cBot parameter, optimized over a date-time 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 OptimizationDateTimeParameter : OptimizationParameter`1

Namespace: cAlgo.API · Group: Optimization · Inherits: 0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]], OptimizationParameter

Examples

var parameter = new OptimizationDateTimeParameter("SessionStart", new DateTime(2025, 1, 1, 6, 0, 0), new DateTime(2025, 1, 1, 12, 0, 0), TimeSpan.FromHours(1));
Print("{0}: {1} to {2} by {3}", parameter.Name, parameter.Min, parameter.Max, parameter.Step);
from System import DateTime, TimeSpan
parameter = OptimizationDateTimeParameter("SessionStart", DateTime(2025, 1, 1, 6, 0, 0), DateTime(2025, 1, 1, 12, 0, 0), TimeSpan.FromHours(1))
api.Print(f"{parameter.Name}: {parameter.Min} to {parameter.Max} by {parameter.Step}")

Constructors

Name Description
OptimizationDateTimeParameter 3 overloadsDesktopCLICloud Optimizes the parameter over the range the minimum to the maximum by the step.

Properties

Name Description
MaxDesktopCLICloudDateTime Gets the inclusive maximum of the range.
MinDesktopCLICloudDateTime Gets the inclusive minimum of the range.
StepDesktopCLICloudTimeSpan Gets the step of the range, as a time span.

Inherited members

From OptimizationParameter: Name, IsOptimized

See also