| Which base class are you using? Here's the source to our Bollinger Band Lower indicator which takes multiple inputs. This should help. public class BollingerBandLower : SeriesCalculatorBaseWithValues { private int periods = 14; private double deviation = 1.5; StdDevQueue stdDevQueue; [ConstructorArgument("Periods", ConstructorArgumentType.Integer, "14", 1)] [ConstructorArgument("Deviation", ConstructorArgumentType.Double, "1.5", 2)] public BollingerBandLower(int periods, double deviation) : base(1) { this.periods = periods; this.deviation = deviation; stdDevQueue = new StdDevQueue(periods); } public BollingerBandLower(int periods, double deviation, ISeries input) : this(periods, deviation) { SetInputs(input); } protected override double CalcNewValue(int index) { double price = inputs[0].LookBack(index); stdDevQueue.AddValue(price); if (!stdDevQueue.Full) { return double.NaN; } return stdDevQueue.Average - (stdDevQueue.StdDev * deviation); } protected override void Reset() { stdDevQueue.Reset(); } } blousetrader (1/21/2010) Does anyone have an example of an indictor with multpile inputs. I'm trying to build one but getting the error 'Overload Resolution failed because no accessible 'New' accepts this number of arhuments'
|