public static CMarket Create() { var market = new CMarketSimulator() { UseMtGox = MainConfiguration.Configuration.MarketSimulatorUseMtgox, UseFile = MainConfiguration.Configuration.MarketSimulatorUseCandleFile, FileName = MainConfiguration.Configuration.MarketSimulatorCandleFileName, DeltaTime = MainConfiguration.Configuration.MarketSimulatorSqLiteDeltaTime, StartTime = MainConfiguration.Configuration.MarketSimulatorSqLiteStartDate, EndTime = MainConfiguration.Configuration.MarketSimulatorSqLiteEndDate, CandleMaker = new CandleMaker() { GenerateFile = MainConfiguration.Configuration.GenerateCandleFile, CandleWidth = MainConfiguration.Configuration.CandleWidthInSeconds, Analyze = TechnicalAnalysis.Analyzer.Builder.Create(MainConfiguration.Configuration.AnalyzerClass) }, CandleMakerHourly = new CandleMaker() { GenerateFile = false, CandleWidth = 60 * (15 * 4), Analyze = null } }; return(market); }
/// <summary> /// /// </summary> /// <param name="clazz">identificativo (nome) della classe</param> /// <returns></returns> public static CMarket Create(string clazz) { switch (clazz) { case "CMarketSimulator": return(CMarketSimulator.Create()); break; case "CMarketMtGoxUSDBTC": return(CMarketMtGoxUsdbtc.Create()); break; case "CMarketBtceUsdBtc": return(CMarketBtceUsdBtc.Create()); break; default: return(null); break; } }