static int Test() { BackTest.Config cfg = new BackTest.Config(); cfg.data_level = "tk"; cfg.begin_date = 20180101; cfg.end_date = 20180201; BackTest.Run(cfg, CreateStralet); return(0); }
public static void Optimise(string strategyName, string dllPath, string logPath = null, string tradesPath = null, string reportPath = null) { _logPath = logPath; _tradesPath = tradesPath; _reportPath = reportPath; try { BackTest bt = new BackTest(OnCompleteBackTest, new MessageDelegate(DisplayMessage)); bt.Run(strategyName, dllPath, true); } catch (Exception ex) { Console.WriteLine(ex.Message, MessageType.Error); } }
static void Test() { var begin_time = DateTime.Now; BackTest.Config cfg = new BackTest.Config(); cfg.dapi_addr = "ipc://tqc_10001"; cfg.data_level = "tk"; cfg.begin_date = 20180101; cfg.end_date = 20180516; BackTest.Run(cfg, CreateStralet); var used_time = System.DateTime.Now - begin_time; Console.WriteLine("used_time: " + used_time.TotalSeconds); }