1. Create your own custom class
namespace NinjaTrader.NinjaScript.Strategies
{
public class Foo
{
public bool bar(int num)
{
return num > 0 ? true : false;
}
}
}
public class TestStrat : Strategy
{
private Foo foo = new Foo();
protected override void OnBarUpdate()
{
bool isGreater = foo.bar(CurrentBar);
Print("Testing foo.bar.. " + isGreater);
}
}
}

Comment