public override void RunStrategy() { Assert.Ignore(); CleanupFiles(); try { Starter starter = CreateStarterCallback(); // Set run properties as in the GUI. starter.ProjectProperties.Starter.StartTime = new TimeStamp("1800/1/1"); starter.ProjectProperties.Starter.EndTime = new TimeStamp("2010/2/17"); starter.DataFolder = "Test\\DataCache"; starter.ProjectProperties.Starter.SetSymbols(Symbols); starter.ProjectProperties.Starter.IntervalDefault = Intervals.Minute1; starter.ProjectProperties.Engine.RealtimeOutput = false; starter.CreateChartCallback = new CreateChartCallback(HistoricalCreateChart); starter.ShowChartCallback = new ShowChartCallback(HistoricalShowChart); // Run the loader. ExampleReversalLoader loader = new ExampleReversalLoader(); starter.Run(loader); // Get the stategy strategy = loader.TopModel as ExampleReversalStrategy; } catch (Exception ex) { log.Error("Setup failed.", ex); throw; } }
public override void RunStrategy() { Assert.Ignore(); CleanupFiles(); StartGUIThread(); Starter starter = new HistoricalStarter(); // Set run properties as in the GUI. starter.ProjectProperties.Starter.StartTime = new TimeStamp(2009, 8, 3); starter.ProjectProperties.Starter.EndTime = new TimeStamp(2009, 8, 4); starter.DataFolder = "Test\\DataCache"; starter.ProjectProperties.Starter.SetSymbols("TXF.Test"); starter.ProjectProperties.Starter.IntervalDefault = Intervals.Minute1; starter.CreateChartCallback = new CreateChartCallback(HistoricalCreateChart); starter.ShowChartCallback = new ShowChartCallback(HistoricalShowChart); // Run the loader. ExampleReversalLoader loader = new ExampleReversalLoader(); starter.Run(loader); // Get the stategy strategy = loader.TopModel as ExampleReversalStrategy; IList <DiagramAttribute> aspects = DiagramHelper.GetAspectsByCalls(); for (int i = 0; i < aspects.Count && i < 100; i++) { var aspect = aspects[i]; log.Notice(aspect.TypeName + "." + aspect.MethodSignature + ": " + aspect.CallCount); } }