示例#1
0
 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);
     }
 }
示例#2
0
 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();
 }
示例#3
0
文件: ADXR.cs 项目: heber/FreeOQ
    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();
    }
示例#4
0
文件: ADX.cs 项目: zhuzhenping/FreeOQ
 public static double Value(TimeSeries input, int index, int length)
 {
     return(ADX.Value(input, index, length, EIndicatorStyle.QuantStudio));
 }