コード例 #1
0
        private void Connector_RxNewSecurity(Security security)
        {
            _connector.RegisterTrades(security);
            _candleManager = new CandleManager(_connector);
            _candleManager.RxWhenCandlesChanged(_candleSeries).Subscribe(CandleManager_RxWhenCandlesChanged);

            _strategy = new MyRxStrategy(_candleSeries)
            {
                Security  = _security,
                Connector = _connector,
                Portfolio = _portfolio,
            };
            _strategy.SetCandleManager(_candleManager);

            _strategy.RxNewMyTrade().Subscribe(MyTradeGrid.Trades.Add);
            _strategy.RxNewMyTrade().Subscribe(FirstStrategy_NewMyTrade);

            _strategy.Start();

            _candleManager.Start(_candleSeries);
            _connector.Start();
        }