예제 #1
0
        public void AddRegressionJobStat()
        {
            var db = new DatsystemsEntities();
            var newRegressionJobStat = new RegressionJobStat {
                JobStat = "", RegressionJobId = 1
            };

            db.RegressionJobStats.Add(newRegressionJobStat);
            db.SaveChanges();
        }
예제 #2
0
 public int AddRegressionJob(string instrumentCode, DateTime startDate, DateTime endDate,
                             int barInterval, string strategyName, bool isDaily, string name)
 {
     dbcontext.RegressionJobs.Add(new RegressionJob
     {
         InstrumentCode                = instrumentCode,
         JobStatus                     = "Pending",
         FinishedAt                    = null,
         RegressionBarInterval         = barInterval,
         RegressionDisplayName         = name,
         RegressionEndDate             = endDate,
         RegressionStartDate           = startDate,
         RegressionIntraDayEnvironment = null,
         RegressionIsDaily             = isDaily,
         RegressionMacroEnvironment    = null,
         RegressionMicroEnvironment    = null,
         RegressionStrategyName        = name,
         SubmittedAt                   = DateTime.UtcNow
     });
     //dbcontext.RegressionJob_Insert(instrumentCode, startDate, endDate, barInterval, strategyName,
     //   isDaily);
     return(dbcontext.SaveChanges());
 }
예제 #3
0
 public void AddRegressionJobBar(int regressionJobUd, int index, Bar bar)
 {
     datsys.RegressionJobBars.Add(new RegressionJobBar
     {
         RegressionJobId = regressionJobUd,
         BarIndex        = index,
         BarMin          = bar.BarMin,
         BarMax          = bar.BarMax
     });
     datsys.SaveChanges();
 }