Skip to content

OptimizationDateOnlyParameter

record cAlgo.API Since 5.9

DesktopCLICloud

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

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

Examples

var parameter = new OptimizationDateOnlyParameter("TradingStartDate", new DateOnly(2025, 1, 1), new DateOnly(2025, 3, 1), TimeSpan.FromDays(7));
Print("{0}: {1} to {2} by {3}", parameter.Name, parameter.Min, parameter.Max, parameter.Step);
from System import DateOnly, TimeSpan
parameter = OptimizationDateOnlyParameter("TradingStartDate", DateOnly(2025, 1, 1), DateOnly(2025, 3, 1), TimeSpan.FromDays(7))
api.Print(f"{parameter.Name}: {parameter.Min} to {parameter.Max} by {parameter.Step}")

Constructors

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

Properties

Name Description
MaxDesktopCLICloudDateOnly Gets the inclusive maximum of the range.
MinDesktopCLICloudDateOnly 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