public void RegisterAll(List <string> instruments, IStrategyRepositoryHelper srep) { MarketWatch.Register(instruments, IndicatorRepository); StrategyRepository.Register(MarketWatch, srep); GeneticEnvironment.Register(this); PortfolioManager.Register(this); MarketMeter.Register(this); PositionLogic.Register(this); DefaultAccount.Register(MarketWatch); }
public ClientContext() { DefaultAccount = new Account(); PortfolioManager = new PortfolioManager(); GeneticEnvironment = new GeneticEnvironment(); MarketWatch = new MarketWatch(); MarketMeter = new MarketMeter(); PerformanceLogic = new PerformanceLogic(); PositionLogic = new PositionLogic(); StrategyRepository = new StrategyRepository(); IndicatorRepository = new IndicatorRepository(); PersistenceLogic = new PersistenceLogic(); PersistenceLogic.Register(this); //we need marketWatch.Instruments in strategyRep before connecting to server when loading report StrategyRepository.Register(MarketWatch, null); //we need this when loading performance PerformanceLogic.Register(this); }