Topics
Replies
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
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