and all my indicators are inside namespace NinjaTrader.NinjaScript.Indicators.LuxAlgo
inside that folder I have a pineLib.cs file that contains my pineLib class
namespace NinjaTrader.NinjaScript.Indicators.LuxAlgo
{
public class pineLib
{
public pineLib(NinjaScriptBase thisOwner, NinjaTrader.Gui.NinjaScript.IndicatorRenderBase RenderBase, Indicator thisIndicator, NinjaTrader.Gui.NinjaScript.IDrawObjects thisdrawObjects, int maxObjectsLimit = 5000)
{
// stuff here
}
}
}
protected static pineLib pine;
and inside State.DataLoaded I initialize it as such
pine = new pineLib(this, this, this, DrawObjects);
anyways this works just fine and everything compiles and works on the chart
inside the pineLib I have
public ISeries<double> highest(int length) { return indicator.MAX(owner.High, length); }
public ISeries<double> highest(ISeries<double> source, int length) { return indicator.MAX(source, length); }
public ISeries<double> lowest(int length) { return indicator.MIN(owner.Low, length); }
public ISeries<double> lowest(ISeries<double> source, int length) { return indicator.MIN(source, length); }
public ISeries<double> ema(ISeries<double> source, int length) { return indicator.EMA(source, length); }
public ISeries<double> sma(ISeries<double> source, int length) { return indicator.SMA(source, length); }
public ISeries<double> atr(int length) { return indicator.ATR(length); }
public double stoch(ISeries<double> source, ISeries<double> high, ISeries<double> low, int length, int offset = 0) { return 100 * (source[offset] - lowest(low, length)[offset]) / (highest(high, length)[offset] - lowest(low, length)[offset]); }
this is to make things easier when converting from Pine Script to NinjaScript
now this all works just fine and never caused me problems
but when I want to export an indicator, that doesn't even use ANY of these above functions
I get this errors
Error compiling export assembly: c:\Users\sebak\Documents\NinjaTrader 8\bin\Custom\Indicators\LuxAlgo\pineLib.cs(324,91) : error CS1061: 'NinjaTrader.NinjaScript.Indicators.Indicator' does not contain a definition for 'MAX' and no extension method 'MAX' accepting a first argument of type 'NinjaTrader.NinjaScript.Indicators.Indicator' could be found (are you missing a using directive or an assembly reference?) Error compiling export assembly: c:\Users\sebak\Documents\NinjaTrader 8\bin\Custom\Indicators\LuxAlgo\pineLib.cs(329,90) : error CS1061: 'NinjaTrader.NinjaScript.Indicators.Indicator' does not contain a definition for 'MIN' and no extension method 'MIN' accepting a first argument of type 'NinjaTrader.NinjaScript.Indicators.Indicator' could be found (are you missing a using directive or an assembly reference?) Error compiling export assembly: c:\Users\sebak\Documents\NinjaTrader 8\bin\Custom\Indicators\LuxAlgo\pineLib.cs(328,72) : error CS1061: 'NinjaTrader.NinjaScript.Indicators.Indicator' does not contain a definition for 'MIN' and no extension method 'MIN' accepting a first argument of type 'NinjaTrader.NinjaScript.Indicators.Indicator' could be found (are you missing a using directive or an assembly reference?) Error compiling export assembly: c:\Users\sebak\Documents\NinjaTrader 8\bin\Custom\Indicators\LuxAlgo\pineLib.cs(332,87) : error CS1061: 'NinjaTrader.NinjaScript.Indicators.Indicator' does not contain a definition for 'EMA' and no extension method 'EMA' accepting a first argument of type 'NinjaTrader.NinjaScript.Indicators.Indicator' could be found (are you missing a using directive or an assembly reference?) Error compiling export assembly: c:\Users\sebak\Documents\NinjaTrader 8\bin\Custom\Indicators\LuxAlgo\pineLib.cs(323,73) : error CS1061: 'NinjaTrader.NinjaScript.Indicators.Indicator' does not contain a definition for 'MAX' and no extension method 'MAX' accepting a first argument of type 'NinjaTrader.NinjaScript.Indicators.Indicator' could be found (are you missing a using directive or an assembly reference?)
now it's also weird that it doesn't seems to mind SMA and ATR
how do I fix this issue? let me know if more information is needed.

Comment