Exemplo n.º 1
0
        public void Register(CommonContext commonContext, int index)
        {
            tsvrLogic        = new TSVRLogic();
            positionLogic    = new PositionLogic();
            performanceLogic = new PerformanceLogic();
            account          = new Account();
            portfolioManager = new PortfolioManager();

            logicIndex = index;

            tsvrLogic.Register(commonContext, this);
            positionLogic.Register(commonContext, this);
            performanceLogic.Register(commonContext, this);
            portfolioManager.Register(commonContext, this);
        }
Exemplo n.º 2
0
        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);
        }