Exemple #1
0
 private void SetStrategiesFromFiles(List <Strategy> strategies, List <string> puths)
 {
     foreach (string puth in puths)
     {
         Strategy strategy = StrategyRepParse.ParseCreateStrategy(puth);
         strategies.Add(strategy);
     }
 }
Exemple #2
0
        private static List <Instrument> ParseInstruments(string path)
        {
            Dictionary <InstrumentTypes, List <string> > instrumentPaths = GetInstrumentsPaths(path);

            List <Instrument> instruments = new List <Instrument>();

            foreach (KeyValuePair <InstrumentTypes, List <string> > instrumentPath in instrumentPaths)
            {
                List <Strategy> strategies = new List <Strategy>();
                foreach (string strategyPath in instrumentPath.Value)
                {
                    Strategy strategy = StrategyRepParse.ParseCreateStrategy(strategyPath);
                    strategies.Add(strategy);
                }

                Instrument instrument = new Instrument(instrumentPath.Key, strategies);
                instruments.Add(instrument);
            }

            return(instruments);
        }