I've created my own class that is nested inside a partial class Indicator. I've created several very simple bool methods that use NT methods. I figured that having my class inherit from Indicator would give me access to NT methods. The code does compile when I implement the NT methods, but when the object is called inside another class that inherits from Indicator the NT methods all return false. I will give one example.
The code to return:
namespace NinjaTrader.NinjaScript.Indicators
{
public partial class Indicator
{
public class MyClass : Indicator
{
public bool JKWilliamsFastLine24Range_IsFalling
(ISeries<double> jkWilliamsFastLine_24Range)
{
return IsFalling(jkWilliamsFastLine_24Range);
}
}
}
}
The code to implement
namespace NinjaTrader.NinjaScript.Indicators
{
public class A1TradeChart : Indicator
{
protected override void OnBarUpdate()
{
Print(CurrentBar);
Print("Falling = " + myClass.JKWilliamsFastLine24Range_IsFalling(jKWill iams_24Range.JKWilliams_Fast));
}
}
}
Output returns false on every bar.
If I place the method
public bool JKWilliamsFastLine24Range_IsFalling
(ISeries<double> jkWilliamsFastLine_24Range)
{
return IsFalling(jkWilliamsFastLine_24Range);
}
inside public partial class Indicator and outside MyClass the method works as expected.
What must I do to gain access to NT methods inside my personal classes?
Thanks

Comment