Skip to content

OptimizationIntegerParameter.Step

property · OptimizationIntegerParameter · cAlgo.API Since 5.9

DesktopCLICloud

Gets the step of the range.

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 int Step {get;}
optimizationIntegerParameter.Step: int

Returns int

Examples

var parameter = new OptimizationIntegerParameter("SlowPeriods", 20, 100, 10);
Print("Passes for this parameter: {0}", (parameter.Max - parameter.Min) / parameter.Step + 1);
parameter = OptimizationIntegerParameter("SlowPeriods", 20, 100, 10)
api.Print(f"Passes for this parameter: {int((parameter.Max - parameter.Min) / parameter.Step) + 1}")