Skip to content

OptimizationTimeFrameParameter

record cAlgo.API Since 5.9

DesktopCLICloud

A TimeFrame cBot parameter, optimized over a set of time frames 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 OptimizationTimeFrameParameter : OptimizationParameter`1

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

Examples

var optimized = new OptimizationTimeFrameParameter("SignalTimeFrame", new[] { TimeFrame.Hour, TimeFrame.Hour4, TimeFrame.Daily });
var fixedValue = new OptimizationTimeFrameParameter("TrendTimeFrame", TimeFrame.Weekly);
Print("{0} candidates: {1}, {2} fixed at {3}", optimized.Name, optimized.Values.Count, fixedValue.Name, fixedValue.Value);
optimized = OptimizationTimeFrameParameter("SignalTimeFrame", [TimeFrame.Hour, TimeFrame.Hour4, TimeFrame.Daily])
fixedValue = OptimizationTimeFrameParameter("TrendTimeFrame", TimeFrame.Weekly)
api.Print(f"{optimized.Name} candidates: {optimized.Values.Count}, {fixedValue.Name} fixed at {fixedValue.Value}")

Constructors

Name Description
OptimizationTimeFrameParameter 3 overloadsDesktopCLICloud Optimizes the parameter over the given values.

Properties

Name Description
ValuesDesktopCLICloudIReadOnlyList<TimeFrame> Gets the discrete set of time frames to optimize over.

Inherited members

From OptimizationParameter: Name, IsOptimized

See also