Exemplo n.º 1
0
        private static SingleDoubleSerieV2 GetSingleDoubleSeriesV2(SMAV2 shortTermSma, string stockName)
        {
            string downloadFolderName = ConfigurationManager.AppSettings["downloadLocation"];

            shortTermSma.Load(downloadFolderName + stockName + ".ax.csv");

            SingleDoubleSerieV2 serie = shortTermSma.Calculate();

            //ExcelUtilities.WriteMacdhistogramDataToExcel(serie, stockName);
            return(serie);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            DownloadAllStockFiles();

            string[] stockNames = ConfigurationManager.AppSettings["StockNames"].Split(',');
            foreach (var stockName in stockNames)
            {
                MACD macd = new MACD(false);

                MACDSerie           macdSeries   = GetMacdSeries(macd, stockName);
                RSI                 rsi          = new RSI(14);
                RSISerie            rsiSeries    = GetRsiSeries(rsi, stockName);
                SMAV2               shortTermSma = new SMAV2(14);
                SingleDoubleSerieV2 shorttermSingleDoubleSerieV2 = GetSingleDoubleSeriesV2(shortTermSma, stockName);
                SMAV2               longTermSma = new SMAV2(60);
                SingleDoubleSerieV2 longtermSingleDoubleSerieV2 = GetSingleDoubleSeriesV2(longTermSma, stockName);

                ExcelUtilities.WriteMacdhistogramDataToExcel(macdSeries, rsiSeries, shorttermSingleDoubleSerieV2, longtermSingleDoubleSerieV2, stockName);
            }
        }