Is there a way to use Symbol.VolumeInUnitsMin in MinValue Parameter?
Is there a way to use Symbol.VolumeInUnitsMin in MinValue Parameter?
13 Sep 2022, 11:27
Hi, is there a way to use Symbol.VolumeInUnitsMin in MinValue Parameter? It comes up with: Error CS0120: An object reference is required for the non-static field, method or property 'Algo Symbol'.
Does this mean I have to give Symbol.VolumeInUnitsMin an object reference or turn it to string?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
namespace cAlgo.Robots
{
[Robot(AccessRights = AccessRights.None)]
public class NewcBot3 : Robot
{
[Parameter("Volume", DefaultValue = 1, MinValue = Symbol.VolumeInUnitsMin)]
public double Volume { get; set; }
protected override void OnStart()
{
Print(Volume);
}
}
}