public static double Value(TimeSeries input, int index, int length, EIndicatorStyle style) { if (index >= 3 * length - 1 + input.FirstIndex) { return((ADX.Value(input, index, length, style) + ADX.Value(input, index - length + 1, length, style)) / 2.0); } else { return(double.NaN); } }
protected override void Init() { this.Name = "ADXR" + (object)this.fLength; this.Title = "ADXR"; this.Clear(); this.fCalculate = true; if (this.fInput == null) { return; } if (TimeSeries.fNameOption == ENameOption.Long) { this.Name = this.fInput.Name + this.Name; } this.Disconnect(); if (this.fADX != null) { this.fADX.Detach(); } this.fADX = new ADX(this.fInput, this.fLength, this.fStyle); this.fADX.DrawEnabled = false; this.Connect(); }
protected override void Init() { this.Name = "ADXR" + (object) this.fLength; this.Title = "ADXR" ; this.Clear(); this.fCalculate = true; if (this.fInput == null) return; if (TimeSeries.fNameOption == ENameOption.Long) this.Name = this.fInput.Name + this.Name; this.Disconnect(); if (this.fADX != null) this.fADX.Detach(); this.fADX = new ADX(this.fInput, this.fLength, this.fStyle); this.fADX.DrawEnabled = false; this.Connect(); }
public static double Value(TimeSeries input, int index, int length) { return(ADX.Value(input, index, length, EIndicatorStyle.QuantStudio)); }