Topics
04 Jun 2015, 20:02
 3385
 7
13 Dec 2013, 07:40
 4457
 14
29 Nov 2013, 08:01
 3978
 3
28 Nov 2013, 02:02
 3507
 5
12 Nov 2013, 21:55
 2973
 2
30 Oct 2013, 06:16
 0
 3816
 4
29 Oct 2013, 07:34
 4115
 3
Replies

Hyperloop
25 Oct 2013, 22:20

Hi, 

Thanks for all your help. I'm still a little confused, could you kindly provide an example code so I know what you mean?

Thanks again. :)


@Hyperloop

Hyperloop
25 Oct 2013, 22:13

Thanks for the help. I appreciate it. Coming from a Python/C background into C# so still getting used to this side of things. :)


@Hyperloop

Hyperloop
24 Oct 2013, 20:52

using System;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.API.Requests;

namespace PBLibrary
{
    public class stdFun
    {
        // Generate Label function
        // string InstanceID = GenerateLabel("123", "1");
        private string GenerateLabel(string argStrategyID, string argVersionID)
        {
            string FinalLabel = argStrategyID + "-" + argVersionID + "-" + Symbol.Code + "-" + TimeFrame.ToString();
            return FinalLabel;
        }
    }
}

Error    1    An object reference is required for the non-static field, method, or property 'cAlgo.API.Internals.Symbol.Code.get'    C:\Users\Clark\Documents\Visual Studio 2010\Projects\PBLibrary\PBLibrary\Class1.cs    15    76    PBLibrary
Error    2    An object reference is required for the non-static field, method, or property 'object.ToString()'    C:\Users\Clark\Documents\Visual Studio 2010\Projects\PBLibrary\PBLibrary\Class1.cs    15    96    PBLibrary

I'm currently getting this error when I am trying to build this library. When simply copied and pasted this method into a Robot it would run fine. I'm a little new to C# so any help would be appreciate.


@Hyperloop