Skip to content

OptimizationDateOnlyParameter.Step

property · OptimizationDateOnlyParameter · cAlgo.API Since 5.9

DesktopCLICloud

Gets the step of the range, as a time span.

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 TimeSpan Step {get;}
optimizationDateOnlyParameter.Step: TimeSpan

Returns TimeSpan

Examples

var parameter = new OptimizationDateOnlyParameter("TradingStartDate", new DateOnly(2025, 1, 1), new DateOnly(2025, 3, 1), TimeSpan.FromDays(7));
Print("Range step: {0} days", parameter.Step.TotalDays);
from System import DateOnly, TimeSpan
parameter = OptimizationDateOnlyParameter("TradingStartDate", DateOnly(2025, 1, 1), DateOnly(2025, 3, 1), TimeSpan.FromDays(7))
api.Print(f"Range step: {parameter.Step.TotalDays} days")