using NinjaTrader.Strategy;
namespace Foo.Bar
{
public partial class FooBar : Strategy
{
protected override void Initialize()
{
VendorLicense("Company", "Product", "Url", "Email");
}
// ... //
public void Test()
{
Print("Hello, World");
}
}
}
next, i create a strategy from within NT7, and intellisence does pick up Foo.Bar.FooBar.Test() as a valid method ... here's that code:
// default using from NT Strategy Wizard
// ... //
namespace NinjaTrader.Strategy
{
public class FooBarTest : Strategy
{
Foo.Bar.FooBar fb;
protected override void Initialize()
{
Foo.Bar.FooBar fb = new Foo.Bar.FooBar();
}
protected override void OnBarUpdate()
{
fb.Test();
}
}
}
1) FooBar and FooBarTest both show up in Strategies window, and licensing works great for FooBar but not FooBarTest
2) when I first apply FooBarTest, i get an error in OnBarUpdate() saying that the Object Reference is not set to an instance of an object.
3) there is no Hello, World in the Output Window for FooBarTest
thanks in advance for any helpful pointers ;-)
cheers,
-e

Comment