Skip to content

ParameterAttribute.MaxValue

property · ParameterAttribute · cAlgo.API

DesktopCLICloud

Gets or sets the maximum value of this Parameter property. It is used for validating user input.

Definition

public object MaxValue {get; set;}
parameterAttribute.MaxValue: object

Returns object

Examples

public partial class ParameterSample : Robot
{
    protected override void OnStart()
    {
        Print("Risk amount: {0}", Account.Balance * RiskPercent / 100);
    }
}
def on_start(self):
    api.Print(f"Risk amount: {api.Account.Balance * api.RiskPercent / 100}")
{
  "AccessRights": "None",
  "Parameters": [
    {
      "Name": "RiskPercent",
      "DisplayName": "Risk %",
      "Type": "Double",
      "DefaultValue": 1,
      "MinValue": 0.1,
      "MaxValue": 5
    }
  ]
}