RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



Accessing System Parameters Expand / Collapse
Message
Posted 2/25/2010 05:24:50 Post #10958
 

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member
Hi,

I am brand new to RE, actually quite new to C# as well, and just downloaded the 2010 environment.
I am trying to start with a simplistic MA crossover system, which I would like to try and optimize just to understand how it works.
I have declared a System Parameter called "Length" in the Properties of the trading system.
I am trying to reference this parameter with the following instruction in my code :
static int maLength = SystemParameters["Length"] ;

I have not been able to compile the code because of the following error :
An object reference is required for the non-static field, method, or property 'RightEdge.Common.SymbolScriptBase.SystemParameters.get'

Could someone please help me with this ?
Thanks in advance,

Pierre


Sorry for disturbing : this is solved. It just required to put the instruction in the proper paragraph of the code, and not to forget to convert the parameter which is double to int via :
maLength = System.Convert.ToInt32(SystemParameters["Length"]) ;

Pierre
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: billb, young, dplaisted

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 2:14pm

2005-2007 © RightEdge Systems