namespace NinjaTrader.NinjaScript.Indicators
{[INDENT]public partial class MySharedMethods : Indicator[/INDENT][INDENT]{[/INDENT][INDENT=2]// This double can be accessed from within an indicator with MySharedMethods.CalculateDelta()
// or can be accessed from any script using NinjaTrader.NinjaScript.Indicators.MySharedMethods.CalculateDelta()
public static double CalculateDelta(double firstPrice, double secondPrice)
{
return Math.Abs(firstPrice - secondPrice);
}[/INDENT][INDENT]}[/INDENT]
}
How can I shorten the method call? I've tried using the namespace: NinjaTrader.NinjaScript.Indicators but I get a compile time error of: NinjaTrader.NinjaScript.Indicators.MySharedMethods () is a method which is not valid in the given context.
I can access the method using the very long method call: NinjaTrader.NinjaScript.Indicators.MySharedMethods .CalculateDelta()

Comment