Exemple #1
0
        public void LoadFromDirectory(string directory, SwapCollection swapCollection,
                                      DateTime start, DateTime end)
        {
            this.Symbol = Path.GetFileName(directory);
            int currencyPrecision = GetPrecision(this.Symbol);

            if (swapCollection == null)
            {
                string baseDir = Path.Combine(directory, "..");
                swapCollection = new SwapCollection().LoadSwap(Path.Combine(baseDir, SwapCollection.SwapFileName));
            }
            this.SwapBuy  = swapCollection.GetBuySwap(this.Symbol);
            this.SwapSell = swapCollection.GetSellSwap(this.Symbol);

            foreach (string filePath in Directory.GetFiles(directory))
            {
                LoadFromUniversalFile(filePath, currencyPrecision, start, end);
            }
        }
Exemple #2
0
 public void LoadFromDirectory(string directory, SwapCollection swapCollection)
 {
     LoadFromDirectory(directory, swapCollection, DateTime.MinValue, DateTime.MaxValue);
 }