Exemplo n.º 1
0
 public static double Value(ISeries input, int index, int length, double k, BarData barData = BarData.Close)
 {
     if (index >= length - 1)
     {
         return(SMA.Value(input, index, length, barData) + k * SMD.Value(input, index, length, barData));
     }
     return(double.NaN);
 }
Exemplo n.º 2
0
        protected internal override void Calculate(int index)
        {
            if (this.calculate)
            {
                this.Calculate();
                return;
            }
            double num = SMD.Value(this.input, index, this.length, this.barData);

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