예제 #1
0
        private async void Form1_Load(object sender, EventArgs e)
        {
            m_Config = new Config();
            string sConfigPath = GetConfigPath();
            m_Config.Init(sConfigPath);

            m_SimulateSystem = new SimulateSystem(m_Config);
            await m_SimulateSystem.Init();
            
            button2.Enabled = true;            
            button4.Enabled = true;
        }
예제 #2
0
 public ApplyStrategy(Config config, Dictionary<int, DateStrategyMap> DateStrategy, string sFilePath, DateTime StartDate, DateTime EndDate, bool bBull, bool bBear)
 {
     m_Config = config;
     m_DateStrategy = DateStrategy;
     LoadExcelFile(sFilePath);
     string sStrategyFileName = Path.GetFileName(sFilePath).Replace(".xlsx", "");
     m_StartDate = StartDate;
     m_EndDate = EndDate;
     string sStartDate = StartDate.ToString("yyyyMMdd");
     string sEndDate = EndDate.ToString("yyyyMMdd");
     string sOrderLogFileName = string.Format("{0}\\{1}_ApplyTo_{2}-{3}.xlsx", m_Config.OutputDirectory, sStrategyFileName, sStartDate, sEndDate);
     orderLog = new OrderLog(sOrderLogFileName);
     this.bBull = bBull;
     this.bBear = bBear;
 }
 public FilterStrategy(Config config)
 {
     m_Config = config;
 }
 public SimulateSystem(Config config)
 {
     m_Config = config;
 }
예제 #5
0
 public StrategyExcel(Config config, string sStrategyName, params object[] arg)
 {
     m_Config = config;
     sStrategyName = string.Format(sStrategyName, arg);
     m_StrategyName = string.Format("{0}\\{1}", m_Config.OutputDirectory, sStrategyName);
 }