示例#1
0
文件: BBU.cs 项目: zhuzhenping/FreeOQ
 public static double Value(TimeSeries input, int index, int length, double k, BarData option)
 {
     if (index >= length - 1 + input.FirstIndex)
     {
         return(SMA.Value(input, index, length, option) + k * SMD.Value(input, index, length, option));
     }
     else
     {
         return(double.NaN);
     }
 }
示例#2
0
 public static double Value(DoubleSeries input, int index, int length)
 {
     return(SMD.Value((TimeSeries)input, index, length, BarData.Close));
 }
示例#3
0
        protected override void Calculate(int index)
        {
            double Data = SMD.Value(this.fInput, index, this.fLength, this.fOption);

            this.Add(this.fInput.GetDateTime(index), Data);
        }