Beispiel #1
0
        private ROCLists CalculateRocR14Days(ROCLists indicators, int index)
        {
            var rocr14 = ROCCalculation.CalculcateRocR(indicators.Select(x => x.Quote.Close).ToList(), 14, index);

            indicators[index].SetROC14Day(rocr14);
            return(indicators);
        }
Beispiel #2
0
        private ROCLists CalculateRocROn9DayEMA(ROCLists indicators, int index)
        {
            var emaList = indicators.Select(x => x.EMA9Day)
                          .ToList();

            if (indicators.Where(z => z.EMA9Day > 0).Count() <= 9)
            {
                return(indicators);
            }

            var rocrOn9DayEMA = ROCCalculation.CalculcateRocR(emaList, 9, index);

            indicators[index].SetRocOn9DayEMA(rocrOn9DayEMA);

            return(indicators);
        }