static StrategyComponentManager() { StrategyComponentManager.templates = new Hashtable(); StrategyComponentManager.templates.Add(ComponentType.CrossEntry, "CrossEntry.cs"); StrategyComponentManager.templates.Add(ComponentType.CrossExit, "CrossExit.cs"); StrategyComponentManager.templates.Add(ComponentType.Entry, "Entry.cs"); StrategyComponentManager.templates.Add(ComponentType.Exit, "Exit.cs"); StrategyComponentManager.templates.Add(ComponentType.ExecutionManager, "ExecutionManager.cs"); StrategyComponentManager.templates.Add(ComponentType.ExposureManager, "ExposureManager.cs"); StrategyComponentManager.templates.Add(ComponentType.MoneyManager, "MoneyManager.cs"); StrategyComponentManager.templates.Add(ComponentType.RiskManager, "RiskManager.cs"); StrategyComponentManager.templates.Add(ComponentType.MarketManager, "MarketManager.cs"); StrategyComponentManager.templates.Add(ComponentType.OptimizationManager, "OptimizationManager.cs"); StrategyComponentManager.templates.Add(ComponentType.ReportManager, "ReportManager.cs"); StrategyComponentManager.templates.Add(ComponentType.MetaExposureManager, "MetaExposureManager.cs"); StrategyComponentManager.templates.Add(ComponentType.MetaMoneyManager, "MetaMoneyManager.cs"); StrategyComponentManager.templates.Add(ComponentType.MetaRiskManager, "MetaRiskManager.cs"); StrategyComponentManager.templates.Add(ComponentType.SimulationManager, "SimulationManager.cs"); StrategyComponentManager.templates.Add(ComponentType.ATSComponent, "ATSComponent.cs"); StrategyComponentManager.templates.Add(ComponentType.ATSCrossComponent, "ATSCrossComponent.cs"); StrategyComponentManager.componentCache = new Hashtable(); StrategyComponentManager.components = new StrategyComponentList(); StrategyComponentManager.builtComponents = new List <string>(); StrategyComponentManager.RegisterDefaultComponents(); }
public static StrategyComponentList GetComponentList(ComponentType componentType) { StrategyComponentList strategyComponentList = new StrategyComponentList(); foreach (ComponentRecord componentRecord in StrategyComponentManager.components) { if ((componentRecord.ComponentType & componentType) != (ComponentType)0) { strategyComponentList.Add(componentRecord); } } return(strategyComponentList); }