namespace NinjaTrader.Strategy
{
class test{
public void testing(){
NinjaTrader.Strategy.Strategy.EnterLong();
}
}
/// <summary>
///
/// </summary>
[Description("My Strategy")]
public class Tra******et2 : Strategy
{}
In the above, I can write code that compiles just fine until I call "EnterLong()". Then it either doesn't find the method or else in the above case I get "An object reference is required for the non-static method..." This suggests that I need an object or a more fully qualified name. The intent of what I want to do is to allow sharing of code across strategies. I do this all the time, but only if I don't call a built-in function like "EnterLong()". Is there a way to solve this? - I think I answered part of my own question: if you could call "EnterLong()" from any strategy then it would not be tied to a particular account. So now I realize you need a particular strategies object. Can I pass into a method a particular strategies object in order to access its "EnterLong()"?

Comment