public double GetSOFastK(int offset)
        {
            var data = Data_Source.TakeLast(this.Rounds + offset).Take(this.Rounds).OrderBy(x => x.date_round).ToList();
            var min  = data.Min(x => x.minimun);
            var max  = data.Max(x => x.maximun);

            if (min == max)
            {
                return(0);
            }

            return(100 * ((data.Last().closing - min) / (max - min)));
        }
        public double GetEMA(int rounds, int offset)
        {
            double result = Data_Source.TakeLast((rounds * 2) + offset).Take(rounds).Average(x => x.closing);
            var    data   = Data_Source.TakeLast(rounds + offset).Take(rounds);

            foreach (Stock_Quote quote in data)
            {
                decimal Kdecimal = Decimal.Divide(2, rounds + 1);
                double  K        = Double.Parse((Math.Truncate(100000000 * Kdecimal) / 100000000).ToString()); //set to 8 decimal places

                result = (quote.closing * K) + (result * (1 - K));
            }

            return(result);
        }