Ejemplo n.º 1
0
        public void TestImportQuotes()
        {
            ISeriesConverter converter = new SeriesConverter();
            QuotesProcessor  processor = new QuotesProcessor(@"C:\quotes\EURUSD\Dukascopy\");
            DateTime         begin     = new DateTime(2010, 1, 1);
            DateTime         end       = new DateTime(2010, 7, 1);

            converter.ImportQuotes(@"C:\hfdata\Temp\EURUSD_DUKAS_TICKS.csv", processor, begin, end);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            ISeriesConverter converter = new SeriesConverter();
            QuotesProcessor  processor = new QuotesProcessor(@"C:\quotes\EURUSD\Dukascopy\");
            DateTime         begin     = new DateTime(2012, 1, 1);
            DateTime         end       = new DateTime(2013, 1, 1);

            converter.ImportQuotes(@"C:\quotes\EURUSD\Dukascopy\EURUSD_DUKAS_TICKS.csv", processor, begin, end);
        }
Ejemplo n.º 3
0
 private void Convert(string providerPath)
 {
     Directory.GetFiles(providerPath, "*.xml").ToList().ForEach(reportFile => {
         string dataFile = reportFile.Replace(".xml", ".csv");
         if (File.Exists(dataFile))
         {
             VerificationReport verificationReport = VerificationReport.LoadFromFile(reportFile);
             if (verificationReport.Verified && !verificationReport.TransformationCompleted)
             {
                 ISeriesConverter converter     = new SeriesConverter();
                 QuotesProcessor processor      = new QuotesProcessor(providerPath);
                 RawDataInformation information = RawDataInformation.FromPath(reportFile);
                 Console.WriteLine("Creating prices from {0}", dataFile);
                 converter.ImportQuotes(dataFile, processor, information.Begin, information.End);
                 verificationReport.TransformationCompleted = true;
                 verificationReport.SaveToFile(reportFile);
             }
         }
         else
         {
             Console.WriteLine("{0} file does not exist!", dataFile);
         }
     });
 }