Ejemplo n.º 1
0
 public HistorySimulator(BasicParam customParam, bool IsTestingMode, FxAdvisorCore.SimpleAdvisor advisor, StrategyParameter currentStrategyParam, string symbol, IMeta meta)
 {
     this.CustomParam  = customParam;
     this.IsSuccessful = false;
     if (IsTestingMode)
     {
         rootPath = System.Configuration.ConfigurationManager.AppSettings["QuotesFullPath"];
     }
     this.Advisor = advisor;
     this.CurrentStrategyParam = currentStrategyParam;
     this.Symbol = InputData.ConvertToStandardName(symbol);
     this.Meta   = meta;
 }
Ejemplo n.º 2
0
        private void DownloadFxopenQuotes(string[] arrSymbols, DateTime start, DateTime end)
        {
            foreach (string cs in arrSymbols)
            {
                GC.Collect();
                GC.WaitForPendingFinalizers();
                GC.Collect();

                string currSymbol = cs.Trim();

                string path = StartupParameters.GetDirectory("fxopenQuotes");
                path = Path.Combine(path, InputData.ConvertToStandardName(currSymbol));
                DataFeedHistory dataFeedHistory = new DataFeedHistory();
                dataFeedHistory.Login();

                IList <GroupTick> listGT = dataFeedHistory.GetAllQuotes(currSymbol, start, end, (LoggerMessage as IAbstractLogger), true);

                //InputData iData = new InputData(listGT);
                //iData.Symbol = InputData.ConvertToStandardName(currSymbol);
                //if (iData.Data.Count != 0)
                //    iData.SaveToDirectory(path, iData.Data.First().DateTime, iData.Data.Last().DateTime);
            }
        }