private void OutputRealDealSummary(DateTime nowDate) { string realDealSummary = "TR:TTP={0},TFP={1},NC={2},NTP={3},NFP={4},NV={5},CP={6},CV={7},CD={8},TC={9},TV={10}"; if (!string.IsNullOrEmpty(this.CandidateParameter.Name)) { realDealSummary = this.CandidateParameter.Name + "-" + realDealSummary; } var testInstancesTemplate = WekaData.GetTestInstancesTemplate(this.CandidateParameter.Name); if (testInstancesTemplate != null && testInstancesTemplate.numInstances() > 0) { m_realDealsInfo.Now(nowDate, WekaUtils.GetValueFromInstance(testInstancesTemplate, "mainClose", 0)); } else { m_realDealsInfo.Now(nowDate, null); } //currentSummary = string.Format(realDealSummary, // (int)eval.numTruePositives(1), (int)eval.numFalsePositives(1), // m_realDealsInfo.NowCost.ToString(Parameters.DoubleFormatString), m_realDealsInfo.NowTp, m_realDealsInfo.NowFp, m_realDealsInfo.NowVolume.ToString("N2"), // m_realDealsInfo.CurrentProfit.ToString(Parameters.DoubleFormatString), m_realDealsInfo.CurrentVolume.ToString("N2"), m_realDealsInfo.CurrentDeal, // m_realDealsInfo.TotalCost.ToString(Parameters.DoubleFormatString), m_realDealsInfo.TotalVolume.ToString("N2")); currentSummary = string.Format(realDealSummary, 0, 0, m_realDealsInfo.NowCost.ToString(Parameters.DoubleFormatString), m_realDealsInfo.NowTp, m_realDealsInfo.NowFp, m_realDealsInfo.NowVolume.ToString("N2"), m_realDealsInfo.CurrentProfit.ToString(Parameters.DoubleFormatString), m_realDealsInfo.CurrentVolume.ToString("N2"), m_realDealsInfo.CurrentDeal, m_realDealsInfo.TotalCost.ToString(Parameters.DoubleFormatString), m_realDealsInfo.TotalVolume.ToString("N2")); //if (m_enableStoreResultInDb) //{ //System.Data.SqlClient.SqlCommand cmd = new SqlCommand("INSERT TestResult (TestName, Date, Content, TotalCost) VALUES (@TestName, @Date, @Content, @TotalCost)"); //cmd.Parameters.AddWithValue("@TestName", TestParameters.TestName); //cmd.Parameters.AddWithValue("@Date", m_testTimeEnd); //cmd.Parameters.AddWithValue("@Content", currentSummary); //cmd.Parameters.AddWithValue("@TotalCost", realDealsInfo.NowCost); //Feng.Data.DbHelper.Instance.ExecuteNonQuery(cmd); //} }
static void Main(string[] args) { System.Console.Write("File Date: "); System.Console.WriteLine(System.IO.File.GetLastWriteTime(System.Reflection.Assembly.GetExecutingAssembly().Location)); try { Microsoft.Practices.ServiceLocation.ServiceLocator.SetLocatorProvider(new Microsoft.Practices.ServiceLocation.ServiceLocatorProvider( delegate() { return(new EmptyServiceProvider()); })); //Feng.Utils.SecurityHelper.SelectAutomaticServer(); java.lang.System.setOut(new PrintStream(new ByteArrayOutputStream())); java.util.TimeZone.setDefault(java.util.TimeZone.getTimeZone("GMT")); string cmdSymbol = "EURUSD"; if (args.Length == 2) { if (args[0] == "-s") { cmdSymbol = args[1]; } } //if (args.Length > 0) //{ // int n = ea.ReadConfig(args); // if (n == 1) // return; //} //DbUtils.CompensateMissingDateAll(); //DbUtils.CheckDataIntegrityAll(); //DbUtils.CheckDateIntegrityOfCount(); //DbUtils.CheckDbZeroValues(); //DbUtils.ConvertHpdataFromSaturday2Monday(); //TestTool.CheckMtData("EURUSD_M1"); //TestTool.CheckMtHpData("EURUSD"); //DbUtils.ImportToDbAll("EURUSD", "M30"); //DbUtils.CalculateUSDX(); //DbUtils.GeneratePeriodData("USDX", "D1", 0); //DbUtils.GenerateIndicators("USDX", "D1"); //return; //DbUtils.GenerateRandomData("EURUSD"); //TestParameters2.InitParameters("EURUSD", "M15", 1); //string updateHpWhere = string.Format("TIME >= {0} AND TIME < {1} AND Time % 1800 = 0", // WekaUtils.GetTimeFromDate(new DateTime(2000, 1, 1)), WekaUtils.GetTimeFromDate(new DateTime(2013, 1, 1))); //DbUtils.UpdateAllHp3("EURUSD", updateHpWhere); //WekaEA.WekaEA2 wekaEA2 = new WekaEA.WekaEA2(); //wekaEA2.Init("EURUSD"); //wekaEA2.RunTool("ImportDB"); //WekaEA.WekaEA2.SimulateMt("EURUSD"); //return; //SimulateIncrementTest(); //TestTool.GenerateConsoleCCs(); //TestTool.CheckHpData(); //TestTool.GetResultCost("f:\\Forex\\console.2000-2012.USDCHF.w8.txt", "d:\\result8.txt"); //TestTool.ParseMtReport4Consecutive(); //TestTool.TestMultiClassifierResult(); //DbUtils.CheckDbCountToSame("D1"); //TestTool.ReorderEaOrderTxt(string.Format("f:\\forex\\TestDebug\\ea_order_{0}.txt", TestParameters2.CandidateParameter.MainSymbol), // "f:\\forex\\TestDebug\\ea_order.txt", 1); //TestTool.GenerateHpAccordCloseTime("USDCHF"); //TestTool.ConvertHpAccordCloseTime(); //DbUtils.GeneratePeriodData("IF9999", "D1", TestParameters2.HourAhead); //DbUtils.GenerateIndicators("AUDUSD", "D1"); //TestTool.ParseDetailDealLog(string.Format("{0}_ccScores_w{1}", TestParameters2.CandidateParameter.MainSymbol, TestParameters2.lastWeek)); //string symbol = cmdSymbol; TestTool.ParseTotalResult("e:\\total_result.txt", "e:\\ff", true); //foreach (var s in Parameters.AllSymbolsFull) //{ // string fileName = string.Format("\\\\192.168.0.10\\f$\\Forex\\Test_{0}\\total_result.txt", s); // if (System.IO.File.Exists(fileName)) // TestTool.ParseTotalResult(fileName, s); //} TaLibTest taLibTest = new TaLibTest(); TestManager tm = new TestManager(); TxtTest txtTest = new TxtTest(); foreach (string s in new string[] { "EURUSD" }) //"GBPUSD", "EURUSD", "USDCHF","AUDUSD", "USDJPY", "USDCAD" { foreach (string p in new string[] { "M15" }) //"M5", "M15", "M30", "H1", "H4", "D1" }) { TestParameters2.InitParameters(s, p, 1); TestParameters.TestName = "Test_" + s; System.IO.File.Delete(TestParameters.GetBaseFilePath("console.txt")); foreach (string s1 in Directory.GetFiles(TestParameters.BaseDir, "ea_order*.txt")) { System.IO.File.Delete(s1); } //TxtTest.SimulateEaOrders(); HpData.Instance.GenerateHpDataToTxt(TestParameters2.CandidateParameter.MainSymbol, TestParameters2.CandidateParameter.MainPeriod); bool[,] selectedTpSl = new bool[20, 20]; for (int i = 0; i < 20; i += 1) { for (int j = 0; j < 20; j += 1) { selectedTpSl[i, j] = false; } } bool onlyOneTime = false; for (int t = 0; t < 1; ++t) { //TestParameters2.TrainStartTime = (new DateTime(2010, 1, 1)).AddMonths(12 * t); //TestParameters2.TrainEndTime = (new DateTime(2010, 1, 1)).AddMonths(12 * (t + 1)); //if (TestParameters2.TrainStartTime > new DateTime(2012, 8, 1)) // break; string resultFileName = TestParameters.GetBaseFilePath("total_result.txt"); var alreadyResults = TestTool.ParseTotalResult(resultFileName, null); for (int i = 9; i >= 2; i -= 1) { for (int j = 19; j >= 2; j -= 1) { if (alreadyResults[i, j] != -1) { continue; } if (!onlyOneTime) { TestParameters2.slStart = i; TestParameters2.slCount = i + 1; TestParameters2.tpStart = j; TestParameters2.tpCount = j + 1; } using (StreamWriter sw = new StreamWriter(resultFileName, true)) { sw.WriteLine(string.Format("{0},{1},{2},{3}", TestParameters2.slStart, TestParameters2.slCount, TestParameters2.tpStart, TestParameters2.tpCount)); if (!(args.Length >= 1 && args[0] == "-t")) { foreach (string s1 in Directory.GetFiles(TestParameters.BaseDir, "IncrementTest_*.txt")) { System.IO.File.Delete(s1); } foreach (string s1 in Directory.GetFiles(TestParameters.BaseDir, "*.arff")) { System.IO.File.Delete(s1); } } try { TestParameters2.OutputParameters(); var s0 = tm.BuildHpProbDeals(); sw.WriteLine(s0); var s1 = tm.BuildPricePatternDeals(); sw.WriteLine(s1); var s2 = taLibTest.BuildCandlePatternDeals(); sw.WriteLine(s2); //foreach (string w in new string[] { "1" }) //{ // TestParameters2.lastWeek = w; // try // { // CCScoreData.Instance.GenerateData(s, Convert.ToInt32(w)); // } // catch (Exception ex) // { // WekaUtils.Instance.WriteLog(ex.Message); // } // CCScoreData.Instance.GenerateDataToTxt(TestParameters2.CandidateParameter.MainSymbol, TestParameters2.lastWeek); // txtTest.BuildCCScoreDeals(); //} WekaUtils.Instance.DeInit(); string result; if (selectedTpSl[i, j] || onlyOneTime) { if (selectedTpSl[i, j]) { sw.WriteLine(string.Format("{0} select {1},{2}", TestParameters2.TrainStartTime.ToString(Parameters.DateTimeFormat), i, j)); } result = txtTest.SimulateAccordDealLog(true); } else { result = txtTest.SimulateAccordDealLog(false); } sw.WriteLine(result); sw.Flush(); string profitString = WekaUtils.GetSubstring(result, "ProfitFactor = "); double profitFactor = 0; if (!string.IsNullOrEmpty(profitString)) { profitFactor = Convert.ToDouble(profitString); } if (profitFactor > 1.1) { selectedTpSl[i, j] = true; } else { selectedTpSl[i, j] = false; } if (!onlyOneTime) { foreach (string is1 in Directory.GetFiles(TestParameters.BaseDir, "IncrementTest_*.txt")) { string is2 = string.Format("{0}_{1}_{2}.txt", is1.Replace(".txt", "").Replace("IncrementTest_", "IncrementTest2_"), i, j); System.IO.File.Delete(is2); System.IO.File.Move(is1, is2); } WekaUtils.Instance.DeInit(); foreach (string is1 in Directory.GetFiles(TestParameters.BaseDir, "console.txt")) { string is2 = string.Format("{0}_{1}_{2}.txt", is1.Replace(".txt", ""), i, j); System.IO.File.Delete(is2); System.IO.File.Move(is1, is2); } } } catch (Exception ex) { WekaUtils.Instance.WriteLog(ex.Message); WekaUtils.Instance.WriteLog(ex.StackTrace); } TestManager.Clear(); if (onlyOneTime) { break; } } if (onlyOneTime) { break; } } HpData.Instance.Clear(); DbData.Instance.Clear(); taLibTest.Clear(); WekaData.ClearTemplates(); CCScoreData.Instance.Clear(); } } TxtTest.SortEaOrders(); } } //foreach (string s in new string[] { "GBPUSD", "AUDUSD", "USDJPY", "USDCAD", "USDCHF", "EURUSD" }) //{ // TestParameters.TestName = "Test_" + s; // TestParameters2.InitParameters(s, "M5", 1); // foreach (string w in new string[] { "1" }) // { // TestParameters2.lastWeek = w; // try // { // CCScoreData.Instance.GenerateData(s, Convert.ToInt32(w)); // } // catch (Exception ex) // { // WekaUtils.Instance.WriteLog(ex.Message); // } // } // foreach (string p in new string[] { "M5", "M15", "M30", "H1", "H4", "D1" }) // { // TestParameters.TestName = "Test_" + s; // if (p == "M5") // TestParameters2.MaxTrainSize = TestParameters2.MinTrainSize = 5; // else // TestParameters2.MaxTrainSize = TestParameters2.MinTrainSize = 2; // TestParameters2.InitParameters(s, p, 1); // //TestParameters2.tpCount = TestParameters2.slCount = 20; // //TestParameters2.InitParameters(symbol, "D1", 4); // //TestParameters2.tpCount = TestParameters2.slCount = 10; // //TestParameters2.tpStart = TestParameters2.slStart = 9; // TestParameters2.OutputParameters(); // foreach (string w in new string[] { "1" }) // { // TestParameters2.lastWeek = w; // CCScoreData.Instance.GenerateDataToTxt(TestParameters2.CandidateParameter.MainSymbol, TestParameters2.lastWeek); // txtTest.BuildCCScoreDeals(); // } // } //} /////////////////////////////////////////////////////////////////////////////////// WaitForThreads(); //Feng.Utils.SecurityHelper.DeselectAutomaticServer(); } catch (Exception ex) { System.Console.WriteLine(ex.Message); System.Console.WriteLine(ex.StackTrace); System.Console.ReadLine(); } System.Console.WriteLine("End"); System.Console.Beep(); ReadLine(60000); }
public void RunOnBar(long nowTime) { DateTime nowDate = WekaUtils.GetDateFromTime(nowTime); //TestParameters2.TrainStartTime = new DateTime(2000, 1, 1); if (nowDate < TestParameters2.TrainStartTime) { return; } TestParameters2.TrainEndTime = nowDate.AddSeconds(1); //// only for batchbatch //var ttts = m_tm.SetTimeMinutesFromTestEnd(nowDate, // TestParameters.BatchTrainMinutes, TestParameters.BatchTestMinutes); //WekaUtils.DebugAssert((ttts[3] - nowDate).TotalMinutes < 1, "(ttts[3] - nowDate).TotalMinutes < 1"); //Console.WriteLine(string.Format("TrainTime = {0}, {1}; TestTime = {2}, {3}", ttts[0], ttts[1], ttts[2], ttts[3])); //if (nowDate >= new DateTime(2004, 3, 29)) //{ //} //WekaUtils.Instance.WriteLog("Run ExecuteCandidate."); //if (!TestParameters2.DBDataConsistent) //{ // _realDealsCandidate.UpdateUnclosedDeals(nowDate); //} //_realDealsCandidate.ExecuteCandidate(nowDate); //WekaUtils.Instance.WriteLog("Run GenerateCCScores."); //GenerateCCScores(nowDate); bool inPrepare = false; if (TestParameters2.InPreparing) { inPrepare = true; } if ((TestParameters2.TrainEndTime - TestParameters2.TrainStartTime).TotalHours < TestParameters2.MinTrainSize * TestParameters2.MainPeriodOfHour) { inPrepare = true; } if (!inPrepare) { WekaUtils.Instance.WriteLog("Run GenerateHpDataToTxt."); HpData.Instance.GenerateHpDataToTxt(TestParameters2.CandidateParameter.MainSymbol, TestParameters2.CandidateParameter.MainPeriod); foreach (string s1 in System.IO.Directory.GetFiles(TestParameters.BaseDir, "*.arff")) { System.IO.File.Delete(s1); } foreach (string s1 in System.IO.Directory.GetFiles(TestParameters.BaseDir, "IncrementTest_*.txt")) { System.IO.File.Delete(s1); } //WekaUtils.Instance.WriteLog("Run BuildHpProbDeals."); m_tm.BuildHpProbDeals(); //WekaUtils.Instance.WriteLog("Run BuildPricePatternDeals."); m_tm.BuildPricePatternDeals(); //WekaUtils.Instance.WriteLog("Run BuildCandlePatternDeals."); m_taLibTest.BuildCandlePatternDeals(); ////WekaUtils.Instance.WriteLog("Run BuildCCScoreDeals."); //m_txtTest.BuildCCScoreDeals(); string orderFile = TestParameters.GetBaseFilePath(string.Format("ea_order_{0}.txt", TestParameters2.CandidateParameter.MainSymbol)); System.IO.File.Delete(orderFile); m_txtTest.MergeAllBuildResult(); if (System.IO.File.Exists(orderFile)) { string signalResultFile = "C:\\ProgramData\\MetaQuotes\\Terminal\\Common\\Files\\{0}_{1}.txt"; if (!TestParameters2.DBDataConsistent) { signalResultFile = string.Format(signalResultFile, "MLEASignal", TestParameters2.CandidateParameter.MainSymbol); } else { signalResultFile = string.Format(signalResultFile, "MLEASignal_db", TestParameters2.CandidateParameter.MainSymbol); } System.IO.File.Copy(orderFile, signalResultFile, true); } } HpData.Instance.Clear(); DbData.Instance.Clear(); m_taLibTest.Clear(); WekaData.ClearTemplates(); CCScoreData.Instance.Clear(); System.GC.Collect(); }
public void ExecuteCandidate(DateTime nowDate) { m_currentTestHour = nowDate.Hour; foreach (var kvp in m_classifierInfos) { kvp.Value.Initialized = false; } if (TestParameters.EnnableLoadTestData) { if (!TestParameters.OnlyNewestTestDataSaved) { CCScoreData.Instance.LoadTestData(nowDate, m_classifierInfos); } else { DateTime?maxTestDate = CCScoreData.Instance.GetNewestTestData(); if (maxTestDate.HasValue && maxTestDate.Value > nowDate) { return; } if (maxTestDate.HasValue && maxTestDate.Value == nowDate) { CCScoreData.Instance.LoadTestData(nowDate, m_classifierInfos); } } } WekaData.GenerateArffTemplate(true, true, this.CandidateParameter); string candidateClsInfoSummary = "CC:N={0},TrN={1},TeN={4},NC={7},NTP={8},NFP={9},NDA={14},NDS={15},TD={10},TV={11},Cls={12},MM={13}"; //Instances testInstancesWithoutClassValue = null; / wrong, should use closeTime System.Threading.Tasks.Task[] tasks; System.Threading.Tasks.TaskFactory taskFactory = null; if (TestParameters.EnableMultiThread) { int cpuCount = Environment.ProcessorCount - 2; cpuCount = Math.Max(cpuCount, 1); LimitedConcurrencyLevelTaskScheduler lcts = new LimitedConcurrencyLevelTaskScheduler(1); taskFactory = new System.Threading.Tasks.TaskFactory(lcts); } if (!TestParameters.EnablePerhourTrain) { tasks = new System.Threading.Tasks.Task[m_classifierInfos.Count]; } else { tasks = new System.Threading.Tasks.Task[m_classifierInfos.Count / Parameters.AllHour]; } int taskIdx = 0; foreach (var kvp in m_classifierInfos) { if (TestParameters.EnablePerhourTrain) { if (kvp.Value.Hour != m_currentTestHour) { continue; } } var clsInfo = kvp.Value; Action action = () => { if (clsInfo.Initialized || nowDate > System.DateTime.Now) { if (m_enableDetailLogLevel2) { WekaUtils.Instance.WriteLog(string.Format(candidateClsInfoSummary, clsInfo.Name, -1, 0, 0, clsInfo.CurrentClassValue.Length, 0, 0, clsInfo.Deals.NowScore.ToString(Parameters.DoubleFormatString), clsInfo.Deals.NowTp, clsInfo.Deals.NowFp, clsInfo.Deals.TotalDeal, clsInfo.Deals.TotalVolume.ToString("N2"), clsInfo.Classifier == null ? string.Empty : clsInfo.Classifier.ToString(), clsInfo.MoneyManagement == null ? string.Empty : clsInfo.MoneyManagement.ToString(), clsInfo.Deals.DealLastTimeAvg, clsInfo.Deals.DealLastTimeStd)); } } else { weka.core.Instances trainInstances; weka.core.Instances testInstances; bool noData = false; if (TestParameters.UseTrain) { clsInfo.WekaData.GenerateData(true, true); trainInstances = clsInfo.WekaData.CurrentTrainInstances; testInstances = clsInfo.WekaData.CurrentTestInstances; if (trainInstances.numInstances() == 0) { if (m_enableDetailLogLevel2) { WekaUtils.Instance.WriteLog(string.Format("{0} - No Train Data", clsInfo.Name)); } noData = true; } } else { clsInfo.WekaData.GenerateData(false, true); trainInstances = WekaData.GetTrainInstancesTemplate(this.CandidateParameter.Name); testInstances = clsInfo.WekaData.CurrentTestInstances; } if (testInstances.numInstances() == 0) { if (m_enableDetailLogLevel2) { WekaUtils.Instance.WriteLog(string.Format("{0} - No Test Data", clsInfo.Name)); } noData = true; } if (!noData) { clsInfo.WekaData.TrainandTest(clsInfo, this.CandidateParameter); clsInfo.Deals.Now(nowDate, WekaUtils.GetValueFromInstance(testInstances, "mainClose", 0)); if (m_enableDetailLogLevel2) { WekaUtils.Instance.WriteLog(string.Format(candidateClsInfoSummary, clsInfo.Name, trainInstances.numInstances(), WekaUtils.GetDateValueFromInstances(trainInstances, 0, 0), WekaUtils.GetDateValueFromInstances(trainInstances, 0, trainInstances.numInstances() - 1), testInstances.numInstances(), WekaUtils.GetDateValueFromInstances(testInstances, 0, 0), WekaUtils.GetDateValueFromInstances(testInstances, 0, testInstances.numInstances() - 1), clsInfo.Deals.NowScore.ToString(Parameters.DoubleFormatString), clsInfo.Deals.NowTp, clsInfo.Deals.NowFp, clsInfo.Deals.TotalDeal, clsInfo.Deals.TotalVolume.ToString("N2"), clsInfo.Classifier == null ? string.Empty : clsInfo.Classifier.ToString(), clsInfo.MoneyManagement == null ? string.Empty : clsInfo.MoneyManagement.ToString(), clsInfo.Deals.DealLastTimeAvg, clsInfo.Deals.DealLastTimeStd)); } } else { clsInfo.CurrentClassValue = Parameters.DoubleArrayEmpty; clsInfo.CurrentTestRet = Parameters.DoubleArrayEmpty; clsInfo.Deals.Now(nowDate, null); if (m_enableDetailLogLevel2) { WekaUtils.Instance.WriteLog(string.Format(candidateClsInfoSummary, clsInfo.Name, trainInstances.numInstances(), 0, 0, testInstances.numInstances(), 0, 0, clsInfo.Deals.NowScore.ToString(Parameters.DoubleFormatString), clsInfo.Deals.NowTp, clsInfo.Deals.NowFp, clsInfo.Deals.TotalDeal, clsInfo.Deals.TotalVolume.ToString("N2"), clsInfo.Classifier == null ? string.Empty : clsInfo.Classifier.ToString(), clsInfo.MoneyManagement == null ? string.Empty : clsInfo.MoneyManagement.ToString(), clsInfo.Deals.DealLastTimeAvg, clsInfo.Deals.DealLastTimeStd)); } } if (TestParameters.EnnableLoadTestData) { CCScoreData.Instance.SaveTestData(clsInfo, nowDate); } if (TestParameters.EnableDetailLog) { // Check TestInstance Result SortedDictionary <int, int> closeNums = new SortedDictionary <int, int>(); for (int i = 0; i < testInstances.numInstances(); ++i) { if (clsInfo.CurrentTestRet[i] != 2) { continue; } DateTime openDate = WekaUtils.GetDateValueFromInstances(testInstances, 0, i); DateTime closeDate = WekaUtils.GetDateValueFromInstances(testInstances, 1, i); WekaUtils.DebugAssert(openDate >= nowDate, "openDate >= nowDate"); int n = (int)(closeDate - nowDate).TotalHours / (TestParameters.BatchTestMinutes / 60) + 1; if (!closeNums.ContainsKey(n)) { closeNums[n] = 1; } else { closeNums[n]++; } } foreach (var cn in closeNums) { WekaUtils.Instance.WriteLog(string.Format(" Next {0} Period-{1} has {2} deals", cn.Key, nowDate.AddHours(TestParameters.BatchTestMinutes / 60 * cn.Key), cn.Value)); } } } clsInfo.WekaData.Clear(); }; if (TestParameters.EnableMultiThread) { tasks[taskIdx] = taskFactory.StartNew(action); taskIdx++; } else { action(); } } if (TestParameters.EnableMultiThread) { try { System.Threading.Tasks.Task.WaitAll(tasks); } catch (AggregateException ex) { foreach (var i in ex.InnerExceptions) { WekaUtils.Instance.WriteLog(i.Message); WekaUtils.Instance.WriteLog(i.StackTrace); } } } if (TestParameters.SaveCCScoresToDb) { CCScoreData.SaveCCScoresToDb(nowDate, this.CandidateParameter, this); } }