Пример #1
0
 public static double Value(ISeries input, int index, int length, double k, BarData barData = BarData.Close)
 {
     if (index >= length - 1)
     {
         double num  = BBL.Value(input, index, length, k, barData);
         double num2 = BBU.Value(input, index, length, k, barData);
         return((input[index, barData] - num) / (num2 - num));
     }
     return(double.NaN);
 }
Пример #2
0
        protected internal override void Calculate(int index)
        {
            if (this.calculate)
            {
                this.Calculate();
                return;
            }
            double num = BBL.Value(this.input, index, this.length, this.k, this.barData);

            if (!double.IsNaN(num))
            {
                base.Add(this.input.GetDateTime(index), num);
            }
        }